# HG changeset patch # User Florian Quze # Date 1227486877 0 # Node ID 168329be9623eefdb676346a7648c09f95cc5ccf # Parent 7d07bb66f70b566da4f3d7d4f398dcf5ed0bd723 Prevent the Buddy State Notification plugin from duplicating notices when the same buddy is in multiple groups. Fixes #7609. committer: John Bailey diff -r 7d07bb66f70b -r 168329be9623 libpurple/plugins/statenotify.c --- a/libpurple/plugins/statenotify.c Mon Nov 24 00:01:27 2008 +0000 +++ b/libpurple/plugins/statenotify.c Mon Nov 24 00:34:37 2008 +0000 @@ -32,13 +32,18 @@ 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