prevent traceback when we receive a message archiving negotiation while our server doesn't support message archiving. Fixes #5859

This commit is contained in:
Yann Leboulanger 2010-10-31 22:02:24 +01:00
parent 5dba2ae974
commit 5a9464f0cf
1 changed files with 4 additions and 1 deletions

View File

@ -97,7 +97,10 @@ class ConnectionArchive:
return self.default
def logging_preference(self, jid, initiator_options=None):
otr = self.get_item_pref(jid)['otr']
otr = self.get_item_pref(jid)
if not otr:
return
otr = otr['otr']
if initiator_options:
if ((initiator_options == ['mustnot'] and otr == 'forbid') or
(initiator_options == ['may'] and otr == 'require')):