ignore attention (XEP-224) when messages is delayed

This commit is contained in:
Yann Leboulanger 2014-03-10 21:47:21 +01:00
parent 3cd06b40eb
commit 0eef85f776
2 changed files with 7 additions and 1 deletions

View File

@ -1311,7 +1311,10 @@ class DecryptedMessageReceivedEvent(nec.NetworkIncomingEvent, HelperEvent):
self.displaymarking = self.seclabel.getTag('displaymarking')
if self.stanza.getTag('attention', namespace=nbxmpp.NS_ATTENTION):
self.attention = True
delayed = self.stanza.getTag('x', namespace=nbxmpp.NS_DELAY) is not\
None
if not delayed:
self.attention = True
self.form_node = self.stanza.getTag('x', namespace=nbxmpp.NS_DATA)

View File

@ -468,6 +468,9 @@ class ConnectionSocks5Bytestream(ConnectionBytestream):
if listener:
self._add_streamhosts_to_query(query, sender, ext_port,
[ext_ip])
else:
self._add_streamhosts_to_query(query, file_props.sender,
ext_port, [ext_ip])
self.connection.send(iq)
cleanup_gupnp()