about summary refs log tree commit diff stats
path: root/src/xmpp/connection.c
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2021-03-11 18:18:03 +0100
committerGitHub <noreply@github.com>2021-03-11 18:18:03 +0100
commita7ecda7773d037fbde7da68c70be2c48497366e1 (patch)
tree4dc832c5f388154754fdbe90894f689e7a6ac97f /src/xmpp/connection.c
parent7d6f01df86631684fe80a3e73ece699cf061498b (diff)
parentb0aea2bcffc760fb4a2041ed0ab20bac40278289 (diff)
downloadprofani-tty-a7ecda7773d037fbde7da68c70be2c48497366e1.tar.gz
Merge pull request #1501 from xenrox/change-password
Add command to change password of logged in user
Diffstat (limited to 'src/xmpp/connection.c')
-rw-r--r--src/xmpp/connection.c13
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)
 {