# HG changeset patch # User Richard Nelson # Date 1239014008 0 # Node ID 5617edc6c7a515bd33e69315bf8f675af1319dd8 # Parent 246081d2d99088766cbbaf5e457b01af07db069d Set PURPLE_MESSAGE_RECV before receiving-im-msg. Also set it when receiving chat messages. diff -r 246081d2d990 -r 5617edc6c7a5 libpurple/server.c --- a/libpurple/server.c Mon Apr 06 10:31:17 2009 +0000 +++ b/libpurple/server.c Mon Apr 06 10:33:28 2009 +0000 @@ -587,6 +587,11 @@ 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 @@ 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 @@ 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;