diff options
Diffstat (limited to 'src/xmpp/connection.c')
-rw-r--r-- | src/xmpp/connection.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/xmpp/connection.c b/src/xmpp/connection.c index d34f9a4f..c188498c 100644 --- a/src/xmpp/connection.c +++ b/src/xmpp/connection.c @@ -451,6 +451,19 @@ connection_get_barejid(void) return result; } +char* +connection_get_user(void) +{ + const char* jid = connection_get_fulljid(); + char* result; + result = strdup(jid); + + char* split = strchr(result, '@'); + *split = '\0'; + + return result; +} + void connection_features_received(const char* const jid) { |