gotr: fixed message injection without session

This commit is contained in:
Kjell Braden
2012-04-16 22:09:16 +02:00
parent b4927cd30d
commit 934cc5d2c8
2 changed files with 5 additions and 5 deletions

View File

@@ -1,7 +1,7 @@
[info]
name: Off-The-Record Encryption
short_name: gotr
version: 1.5
version: 1.6
description: See http://www.cypherpunks.ca/otr/
authors: Kjell Braden <afflux.gajim@pentabarf.de>
homepage: http://gajim-otr.pentabarf.de

View File

@@ -97,11 +97,11 @@ class GajimContext(potr.context.Context):
account = self.user.accountname
stanza = common.xmpp.Message(to=self.peer, body=msg, typ='chat')
if appdata and 'session' in appdata:
session = appdata['session']
stanza.setThread(session.thread_id)
if appdata is not None:
session = appdata.get('session', None)
if session is not None:
stanza.setThread(session.thread_id)
gajim.connections[account].connection.send(stanza, now=True)
return
def setState(self, newstate):
if self.state == potr.context.STATE_ENCRYPTED: