mcabber/mcabber/xmpp_muc.c
changeset 2124 af7e705380b2
parent 2026 564d99cdf0d1
child 2125 fef71336e429
--- a/mcabber/mcabber/xmpp_muc.c	Wed May 14 13:57:56 2014 +0400
+++ b/mcabber/mcabber/xmpp_muc.c	Wed May 14 14:13:27 2014 +0400
@@ -335,12 +335,17 @@
   *mbjid = lm_message_node_get_attribute(y, "jid");
   *mbnick = lm_message_node_get_attribute(y, "nick");
   // For kick/ban, there can be actor and reason tags
+  z = lm_message_node_find_child(y, "actor");
+  if (z) {
+    // prefer nick over jid
+    *actorjid = lm_message_node_get_attribute(z, "nick");
+    if (!*actorjid)
+      *actorjid = lm_message_node_get_attribute(z, "jid");
+  }
+
   *reason = lm_message_node_get_child_value(y, "reason");
   if (*reason && !**reason)
     *reason = NULL;
-  z = lm_message_node_find_child(y, "actor");
-  if (z)
-    *actorjid = lm_message_node_get_attribute(z, "jid");
 }
 
 //  muc_handle_join(...)