summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2016-02-13 14:48:14 +0100
committermathieui <mathieui@mathieui.net>2016-02-13 14:48:25 +0100
commit2354e7d10203f0561f3c4d6657f044b3938b8db1 (patch)
tree687395b13691b87f4da4c6f0e122a44b6ff3515c /plugins
parentb242ea24bc80fe21ce9a6900e70ba1d62230b3d1 (diff)
downloadpoezio-2354e7d10203f0561f3c4d6657f044b3938b8db1.tar.gz
poezio-2354e7d10203f0561f3c4d6657f044b3938b8db1.tar.bz2
poezio-2354e7d10203f0561f3c4d6657f044b3938b8db1.tar.xz
poezio-2354e7d10203f0561f3c4d6657f044b3938b8db1.zip
Fix tab-specific options in the OTR plugin
(specifically, require_encryption and log)
Diffstat (limited to 'plugins')
-rw-r--r--plugins/otr.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/plugins/otr.py b/plugins/otr.py
index 12dd1877..3942bcd8 100644
--- a/plugins/otr.py
+++ b/plugins/otr.py
@@ -535,17 +535,17 @@ class Plugin(BasePlugin):
"""
Retrieve or create an OTR context
"""
- jid = safeJID(jid).full
- if not jid in self.contexts:
+ jid = safeJID(jid)
+ if not jid.full in self.contexts:
flags = POLICY_FLAGS.copy()
require = self.config.get_by_tabname('require_encryption',
- jid, default=False)
+ jid.bare, default=False)
flags['REQUIRE_ENCRYPTION'] = require
- logging_policy = self.config.get_by_tabname('log', jid, default=False)
- self.contexts[jid] = PoezioContext(self.account, jid, self.core.xmpp, self.core)
- self.contexts[jid].log = 1 if logging_policy else 0
- self.contexts[jid].flags = flags
- return self.contexts[jid]
+ logging_policy = self.config.get_by_tabname('log', jid.bare , default=False)
+ self.contexts[jid.full] = PoezioContext(self.account, jid.full, self.core.xmpp, self.core)
+ self.contexts[jid.full].log = 1 if logging_policy else 0
+ self.contexts[jid.full].flags = flags
+ return self.contexts[jid.full]
def on_conversation_msg(self, msg, tab):
"""