changeset 28783:a50e21712f1d

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
author Mark Doliner <mark@kingant.net>
date Wed, 21 Oct 2009 22:23:53 +0000
parents d1c18bd588e2
children 6ef2cfa15ae7
files libpurple/server.c
diffstat 1 files changed, 4 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/server.c	Tue Oct 20 21:20:22 2009 +0000
+++ b/libpurple/server.c	Wed Oct 21 22:23:53 2009 +0000
@@ -787,13 +787,10 @@
 	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);