don't take into account chatstate when message is delayed (offline message, ...). Fixes #1294
This commit is contained in:
parent
050cffac8a
commit
e85c373a95
|
@ -386,14 +386,16 @@ class Connection:
|
|||
encTag = None
|
||||
decmsg = ''
|
||||
invite = None
|
||||
delayed = False
|
||||
for xtag in xtags:
|
||||
if xtag.getNamespace() == common.xmpp.NS_ENCRYPTED:
|
||||
encTag = xtag
|
||||
break
|
||||
# invitations
|
||||
elif xtag.getNamespace() == common.xmpp.NS_MUC_USER and \
|
||||
xtag.getTag('invite'):
|
||||
xtag.getTag('invite') and not encTag:
|
||||
invite = xtag
|
||||
elif xtag.getNamespace() == common.xmpp.NS_DELAY:
|
||||
delayed = True
|
||||
# FIXME: Msn transport (CMSN1.2.1 and PyMSN0.10) do NOT RECOMMENDED
|
||||
# invitation
|
||||
# stanza (MUC JEP) remove in 2007, as we do not do NOT RECOMMENDED
|
||||
|
@ -402,7 +404,8 @@ class Connection:
|
|||
room_jid = xtag.getAttr('jid')
|
||||
self.dispatch('GC_INVITATION', (room_jid, frm, '', None))
|
||||
return
|
||||
# chatstates - look for chatstate tags in a message
|
||||
# chatstates - look for chatstate tags in a message if not delayed
|
||||
if not delayed:
|
||||
children = msg.getChildren()
|
||||
for child in children:
|
||||
if child.getNamespace() == 'http://jabber.org/protocol/chatstates':
|
||||
|
|
Loading…
Reference in New Issue