Skip to content
Snippets Groups Projects
Commit 934cc5d2 authored by Kjell Braden's avatar Kjell Braden
Browse files

gotr: fixed message injection without session

parent b4927cd3
No related branches found
No related tags found
No related merge requests found
[info] [info]
name: Off-The-Record Encryption name: Off-The-Record Encryption
short_name: gotr short_name: gotr
version: 1.5 version: 1.6
description: See http://www.cypherpunks.ca/otr/ description: See http://www.cypherpunks.ca/otr/
authors: Kjell Braden <afflux.gajim@pentabarf.de> authors: Kjell Braden <afflux.gajim@pentabarf.de>
homepage: http://gajim-otr.pentabarf.de homepage: http://gajim-otr.pentabarf.de
...@@ -97,11 +97,11 @@ class GajimContext(potr.context.Context): ...@@ -97,11 +97,11 @@ class GajimContext(potr.context.Context):
account = self.user.accountname account = self.user.accountname
stanza = common.xmpp.Message(to=self.peer, body=msg, typ='chat') stanza = common.xmpp.Message(to=self.peer, body=msg, typ='chat')
if appdata and 'session' in appdata: if appdata is not None:
session = appdata['session'] session = appdata.get('session', None)
stanza.setThread(session.thread_id) if session is not None:
stanza.setThread(session.thread_id)
gajim.connections[account].connection.send(stanza, now=True) gajim.connections[account].connection.send(stanza, now=True)
return
def setState(self, newstate): def setState(self, newstate):
if self.state == potr.context.STATE_ENCRYPTED: if self.state == potr.context.STATE_ENCRYPTED:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment