Fix crash in GC query when OTR is active.
This commit is contained in:
parent
4c3dc0b092
commit
b5a9edc6b4
|
@ -291,6 +291,7 @@ class OtrlMessageAppOps:
|
||||||
if ctrl:
|
if ctrl:
|
||||||
ctrl.print_conversation_line(u" [OTR] %s"%msg, 'status', '', None)
|
ctrl.print_conversation_line(u" [OTR] %s"%msg, 'status', '', None)
|
||||||
id = gajim.logger.write('chat_msg_recv', fjid, message=msg, tim=tim)
|
id = gajim.logger.write('chat_msg_recv', fjid, message=msg, tim=tim)
|
||||||
|
if id:
|
||||||
gajim.logger.set_read_messages([id])
|
gajim.logger.set_read_messages([id])
|
||||||
|
|
||||||
def policy(self, opdata=None, context=None):
|
def policy(self, opdata=None, context=None):
|
||||||
|
@ -384,8 +385,7 @@ class OtrlMessageAppOps:
|
||||||
opdata['account'], context.username, no_print=True)
|
opdata['account'], context.username, no_print=True)
|
||||||
|
|
||||||
ctrl = gajim.interface.msg_win_mgr.get_control(
|
ctrl = gajim.interface.msg_win_mgr.get_control(
|
||||||
gajim.get_jid_without_resource(unicode(context.username)),
|
unicode(context.username), opdata['account'])
|
||||||
opdata['account'])
|
|
||||||
if ctrl:
|
if ctrl:
|
||||||
ctrl.update_otr(True)
|
ctrl.update_otr(True)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue