# HG changeset patch # User sh!zeeg # Date 1400062407 -14400 # Node ID af7e705380b2a40c39d2e0db2013c28d5c984677 # Parent 300e7bf4416a0470870aaa54a8ca42676a35298a MUC: when supported, prefer to show actor's nick over actor's jid on kick/ban. diff -r 300e7bf4416a -r af7e705380b2 mcabber/mcabber/xmpp_muc.c --- 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(...)