From ff5fd608611d927557d001e67d6ec45377ca4e62 Mon Sep 17 00:00:00 2001
From: Alex Mauer <hawke@hawkesnest.net>
Date: Fri, 31 Mar 2006 17:35:05 +0000
Subject: [PATCH] * Add option 'dont_ack_s10n' to prevent the infinite loop
 with jabberd2 subscription acknowledgements.

---
 src/common/config.py | 1 +
 src/gajim.py         | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/common/config.py b/src/common/config.py
index ebe900468a..8c4a76a154 100644
--- a/src/common/config.py
+++ b/src/common/config.py
@@ -227,6 +227,7 @@ class Config:
 			# try for 2 minutes before giving up (aka. timeout after those seconds)
 			'try_connecting_for_foo_secs': [ opt_int, 60 ],
 			'http_auth': [opt_str, 'ask'], # yes, no, ask
+			'dont_ack_s10n': [opt_bool, False],
 			# proxy65 for FT
 			'file_transfer_proxies': [opt_str, 
 			'proxy.jabber.org, proxy.netlab.cz, transfer.jabber.freenet.de'],
diff --git a/src/gajim.py b/src/gajim.py
index 8f858b6c9c..4054061722 100755
--- a/src/gajim.py
+++ b/src/gajim.py
@@ -650,7 +650,8 @@ class Interface:
 		dialogs.InformationDialog(_('Authorization accepted'),
 				_('The contact "%s" has authorized you to see his or her status.')
 				% jid)
-		gajim.connections[account].ack_subscribed(jid)
+		if not gajim.config.get_per('accounts',account,'dont_ack_s10n'):
+			gajim.connections[account].ack_subscribed(jid)
 		if self.remote_ctrl:
 			self.remote_ctrl.raise_signal('Subscribed', (account, array))
 
-- 
GitLab