pidgin: 0257ab6e: Set PURPLE_MESSAGE_RECV before receiving...

wabz at pidgin.im wabz at pidgin.im
Mon Apr 6 06:40:38 EDT 2009


-----------------------------------------------------------------
Revision: 0257ab6e534144a7fd317f997e1f0e19ff8bd82b
Ancestor: a0d9c8509c017c1eb52b8b3e1172e9d0ee0b0a51
Author: wabz at pidgin.im
Date: 2009-04-06T10:33:28
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/0257ab6e534144a7fd317f997e1f0e19ff8bd82b

Modified files:
        libpurple/server.c

ChangeLog: 

Set PURPLE_MESSAGE_RECV before receiving-im-msg. Also set it when receiving chat messages.

-------------- next part --------------
============================================================
--- libpurple/server.c	b9c6a880738b280c7302dd352dfe947ee3f7101e
+++ libpurple/server.c	3765f51e4eaa8ab0a6b533e07c639497950eb605
@@ -587,6 +587,11 @@ void serv_got_im(PurpleConnection *gc, c
 
 	account  = purple_connection_get_account(gc);
 
+	/*
+	 * XXX: Should we be setting this here, or relying on prpls to set it?
+	 */
+	flags |= PURPLE_MESSAGE_RECV;
+
 	if (PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc))->set_permit_deny == NULL) {
 		/* protocol does not support privacy, handle it ourselves */
 		if (!purple_privacy_check(account, who)) {
@@ -630,11 +635,6 @@ void serv_got_im(PurpleConnection *gc, c
 	if (conv == NULL)
 		conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, name, gc->account);
 
-	/*
-	 * XXX: Should we be setting this here, or relying on prpls to set it?
-	 */
-	flags |= PURPLE_MESSAGE_RECV;
-
 	if (conv == NULL)
 		conv = purple_conversation_new(PURPLE_CONV_TYPE_IM, account, name);
 
@@ -925,6 +925,12 @@ void serv_got_chat_in(PurpleConnection *
 	g_return_if_fail(who != NULL);
 	g_return_if_fail(message != NULL);
 
+	/*
+	 * XXX: Should we be setting this here, or relying on prpls to set it?
+	 */
+	if (g_strcmp0(purple_account_get_username(g->account), who))
+		flags |= PURPLE_MESSAGE_RECV;
+
 	for (bcs = g->buddy_chats; bcs != NULL; bcs = bcs->next) {
 		conv = (PurpleConversation *)bcs->data;
 


More information about the Commits mailing list