diff options
author | Michael Vetter <jubalh@iodoru.org> | 2020-05-25 13:04:19 +0200 |
---|---|---|
committer | Michael Vetter <jubalh@iodoru.org> | 2020-05-25 13:04:19 +0200 |
commit | de8975c008aa4016e7bc1b817a62d90f9f45cefa (patch) | |
tree | 20d979e8f67895d39ca8fee74e5b49999839ac2c /src/xmpp/connection.c | |
parent | 4b5711fad5585149de65319a8f27cb7ba3a439a5 (diff) | |
download | profani-tty-de8975c008aa4016e7bc1b817a62d90f9f45cefa.tar.gz |
Add and use connection_get_barejid()
Instead of connection_get_fulljid() and then creating a Jid from it.
Diffstat (limited to 'src/xmpp/connection.c')
-rw-r--r-- | src/xmpp/connection.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/xmpp/connection.c b/src/xmpp/connection.c index 013a09e1..18b177c6 100644 --- a/src/xmpp/connection.c +++ b/src/xmpp/connection.c @@ -411,6 +411,18 @@ connection_get_fulljid(void) } } +char* +connection_get_barejid(void) { + const char *jid = connection_get_fulljid(); + char *result; + + Jid *jidp = jid_create(jid); + result = strdup(jidp->barejid); + jid_destroy(jidp); + + return result; +} + void connection_features_received(const char *const jid) { |