about summary refs log tree commit diff stats
path: root/src/xmpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/xmpp')
-rw-r--r--src/xmpp/ox.c13
-rw-r--r--src/xmpp/presence.c2
2 files changed, 10 insertions, 5 deletions
diff --git a/src/xmpp/ox.c b/src/xmpp/ox.c
index da05af89..7f0304f5 100644
--- a/src/xmpp/ox.c
+++ b/src/xmpp/ox.c
@@ -325,11 +325,14 @@ _ox_metadata_result(xmpp_stanza_t* const stanza, void* const userdata)
 
     while (pubkeymetadata) {
         const char* fingerprint = xmpp_stanza_get_attribute(pubkeymetadata, STANZA_ATTR_V4_FINGERPRINT);
-        if (strlen(fingerprint) == KEYID_LENGTH) {
-            cons_show(fingerprint);
-        } else {
-            cons_show("OX: Wrong char size of public key");
-            log_error("[OX] Wrong chat size of public key %s", fingerprint);
+
+        if (fingerprint) {
+            if (strlen(fingerprint) == KEYID_LENGTH) {
+                cons_show(fingerprint);
+            } else {
+                cons_show("OX: Wrong char size of public key");
+                log_error("[OX] Wrong chat size of public key %s", fingerprint);
+            }
         }
         pubkeymetadata = xmpp_stanza_get_next(pubkeymetadata);
     }
diff --git a/src/xmpp/presence.c b/src/xmpp/presence.c
index b5cb1803..17e30d75 100644
--- a/src/xmpp/presence.c
+++ b/src/xmpp/presence.c
@@ -752,6 +752,8 @@ _muc_user_self_handler(xmpp_stanza_t* stanza)
             log_warning("presence: jid without resource");
             return;
         }
+
+        muc_nick_change_complete(room, nick);
         char* reason = stanza_get_reason(stanza);
         char* show_str = stanza_get_show(stanza, "online");
         char* status_str = stanza_get_status(stanza, NULL);