pidgin: ef394de3: Call purple_privacy_check() even when th...

markdoliner at pidgin.im markdoliner at pidgin.im
Wed Oct 21 18:31:27 EDT 2009


-----------------------------------------------------------------
Revision: ef394de322deb70bc777c60b6d072cf7bab18c03
Ancestor: 0d33eae1cfd57cb5f459518ad5db14230f13792b
Author: markdoliner at pidgin.im
Date: 2009-10-21T22:23:53
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/ef394de322deb70bc777c60b6d072cf7bab18c03

Modified files:
        libpurple/server.c

ChangeLog: 

Call purple_privacy_check() even when the protocol has some privacy
functionality itself.  This causes us to drop chat invites when a
user has blocked a buddy and the server doesn't drop the chat invite
itself

-------------- next part --------------
============================================================
--- libpurple/server.c	3eab2a30f322631a204707cc520a684824922d73
+++ libpurple/server.c	11b25e4324f4a3fb638c500c9870cc6a435426d4
@@ -787,13 +787,10 @@ void serv_got_chat_invite(PurpleConnecti
 	int plugin_return;
 
 	account = purple_connection_get_account(gc);
-	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)) {
-			purple_signal_emit(purple_conversations_get_handle(), "chat-invite-blocked",
-					account, who, name, message, data);
-			return;
-		}
+	if (!purple_privacy_check(account, who)) {
+		purple_signal_emit(purple_conversations_get_handle(), "chat-invite-blocked",
+				account, who, name, message, data);
+		return;
 	}
 
 	cid = g_new0(struct chat_invite_data, 1);


More information about the Commits mailing list