# HG changeset patch # User Mikael Berthe # Date 1345889131 -7200 # Node ID 33426f7fb4a912411ea3d81dd17f415dce6399a9 # Parent 789779fd728df01f968aaf5c96af079edc414be6 MUC mediated invitation: don't show empty reason on declined invitation diff -r 789779fd728d -r 33426f7fb4a9 mcabber/mcabber/xmpp_muc.c --- a/mcabber/mcabber/xmpp_muc.c Sat Aug 25 12:05:19 2012 +0200 +++ b/mcabber/mcabber/xmpp_muc.c Sat Aug 25 12:05:31 2012 +0200 @@ -767,7 +767,7 @@ GSList *room_elt; sbuf = g_string_new(""); - if (reason) { + if (reason && reason[0]) { g_string_printf(sbuf, "Received an invitation to <%s>, from <%s>, reason: %s", to, from, reason); @@ -857,11 +857,11 @@ const char *decline_from = lm_message_node_get_attribute(node, "from"); const char *reason = lm_message_node_get_child_value(node, "reason"); if (decline_from) { - if (reason) - scr_LogPrint(LPRINT_LOGNORM, "<%s> declines your invitation: %s.", + if (reason && reason[0]) + scr_LogPrint(LPRINT_LOGNORM, "<%s> declined your invitation: %s.", from, reason); else - scr_LogPrint(LPRINT_LOGNORM, "<%s> declines your invitation.", from); + scr_LogPrint(LPRINT_LOGNORM, "<%s> declined your invitation.", from); } }