Fix /say_to to a member of a folded group
Issue reported by Salvador.
--- a/mcabber/src/screen.c Thu Dec 21 00:58:20 2006 +0200
+++ b/mcabber/src/screen.c Thu Dec 28 15:00:59 2006 +0100
@@ -1372,13 +1372,19 @@
prefix |= HBB_PREFIX_IN;
scr_WriteMessage(jidfrom, text, timestamp, prefix);
- update_panels();
}
void scr_WriteOutgoingMessage(const char *jidto, const char *text, guint prefix)
{
+ GSList *roster_elt;
+ roster_elt = roster_find(jidto, jidsearch,
+ ROSTER_TYPE_USER|ROSTER_TYPE_AGENT|ROSTER_TYPE_ROOM);
+
scr_WriteMessage(jidto, text, 0, prefix|HBB_PREFIX_OUT|HBB_PREFIX_HLIGHT);
- scr_ShowWindow(jidto, FALSE);
+
+ // Show jidto's buffer unless the buddy is not in the buddylist
+ if (roster_elt && g_list_position(buddylist, roster_elt->data) != -1)
+ scr_ShowWindow(jidto, FALSE);
}
static inline void set_autoaway(bool setaway)