Fix a possible traceback in the OTR plugin

This commit is contained in:
mathieui 2015-04-08 19:47:21 +02:00
parent 7b05fa47c1
commit 87e16546b9
No known key found for this signature in database
GPG key ID: C59F84CEEFD616E3

View file

@ -893,7 +893,7 @@ class Plugin(BasePlugin):
if secs > 0:
event = self.api.create_delayed_event(secs, notify_otr_timeout)
self.api.add_timed_event(event)
body = self.contexts[name].sendMessage(0, b'?OTRv?').decode()
body = self.get_context(name).sendMessage(0, b'?OTRv?').decode()
self.core.xmpp.send_message(mto=name, mtype='chat', mbody=body)
tab.add_message(OTR_REQUEST % format_dict, typ=0)