pidgin: a58225b2: Prevent the Buddy State Notification plu...

rekkanoryo at pidgin.im rekkanoryo at pidgin.im
Sun Nov 23 19:55:35 EST 2008


-----------------------------------------------------------------
Revision: a58225b22301de0a19852b59dcd09a66017d8e0e
Ancestor: 3be463a6c799d2ecdf6c2806ccdcfb3e970799e1
Author: florian at instantbird.org
Date: 2008-11-24T00:34:37
Date: 2008-11-24T00:40:57
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/a58225b22301de0a19852b59dcd09a66017d8e0e

Modified files:
        libpurple/plugins/statenotify.c

ChangeLog: 

Prevent the Buddy State Notification plugin from duplicating notices when
the same buddy is in multiple groups.  Fixes #7609.

ChangeLog: 

Prevent the Buddy State Notification plugin from printing duplicate
notifications when the same buddy is in multiple groups on protocols which
support it.  Also prevent autolinkification of JID's, MSN passport addresses,
etc. in the notification messages.  Fixes #7609.

-------------- next part --------------
============================================================
--- libpurple/plugins/statenotify.c	0aa8c83c7474506fdf41e4062d77ddc420a563ae
+++ libpurple/plugins/statenotify.c	e77cf979c642daf15ac47bbd0158319fd301072d
@@ -32,13 +32,18 @@ write_status(PurpleBuddy *buddy, const c
 		return;
 	g_return_if_fail(conv->type == PURPLE_CONV_TYPE_IM);
 
+	/* Prevent duplicate notifications for buddies which are multiple times
+	   in the buddy list */
+	if (buddy != purple_find_buddy(buddy->account, buddy->name))
+		return;
+
 	who = purple_buddy_get_alias(buddy);
 	escaped = g_markup_escape_text(who, -1);
 
 	g_snprintf(buf, sizeof(buf), message, escaped);
 	g_free(escaped);
 
-	purple_conv_im_write(conv->u.im, NULL, buf, PURPLE_MESSAGE_SYSTEM | PURPLE_MESSAGE_ACTIVE_ONLY, time(NULL));
+	purple_conv_im_write(conv->u.im, NULL, buf, PURPLE_MESSAGE_SYSTEM | PURPLE_MESSAGE_ACTIVE_ONLY | PURPLE_MESSAGE_NO_LINKIFY, time(NULL));
 }
 
 static void


More information about the Commits mailing list