cpw.attention_ui: 07cb8d6b: jabber: Don't pre-create a conversation ...
malu at pidgin.im
malu at pidgin.im
Mon Nov 16 15:00:37 EST 2009
-----------------------------------------------------------------
Revision: 07cb8d6bf07818234e8be72eab5a16c5657a861b
Ancestor: 741fe71ff3f5408cc18e9d93b6e8cc3a25f54265
Author: malu at pidgin.im
Date: 2009-11-16T19:59:20
Branch: im.pidgin.cpw.attention_ui
URL: http://d.pidgin.im/viewmtn/revision/info/07cb8d6bf07818234e8be72eab5a16c5657a861b
Modified files:
libpurple/protocols/jabber/message.c
ChangeLog:
jabber: Don't pre-create a conversation on an incoming attention
Prevents a conversation popping up despite "Hide new IM"
-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/message.c abf51a57d6cbe0b524e804b0e2ac6acabf739ec7
+++ libpurple/protocols/jabber/message.c 97a2864f47368861fdb75b72f317c3e00e45ee91
@@ -295,7 +295,6 @@ static void handle_buzz(JabberMessage *j
PurpleBuddy *buddy;
PurpleAccount *account;
PurpleConversation *c;
- char *username;
/* Delayed buzz MUST NOT be accepted */
if(jm->delayed)
@@ -310,16 +309,11 @@ static void handle_buzz(JabberMessage *j
if ((buddy = purple_find_buddy(account, jm->from)) == NULL)
return; /* Do not accept buzzes from unknown people */
- c = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, jm->from, account);
- if (c == NULL)
- c = purple_conversation_new(PURPLE_CONV_TYPE_IM, account, jm->from);
-
- username = g_markup_escape_text(purple_buddy_get_alias(buddy), -1);
/* xmpp only has 1 attention type, so index is 0 */
purple_prpl_got_attention(jm->js->gc, jm->from, 0);
- purple_conversation_attention(c, jm->from, 0, PURPLE_MESSAGE_RECV, time(NULL));
-
- g_free(username);
+ c = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, jm->from, account);
+ if (c)
+ purple_conversation_attention(c, jm->from, 0, PURPLE_MESSAGE_RECV, time(NULL));
}
/* used internally by the functions below */
More information about the Commits
mailing list