stop sending chatstates when remote server doesn't respond anymore. Don't acknoledge error message receipes. Fixes #4064

This commit is contained in:
Yann Leboulanger 2009-10-01 09:41:46 +02:00
parent 3802e01bba
commit c31d3e526a
2 changed files with 6 additions and 1 deletions

View File

@ -2004,7 +2004,7 @@ class ConnectionHandlers(ConnectionVcard, ConnectionBytestream, ConnectionDisco,
if msg.getTag('request', namespace=common.xmpp.NS_RECEIPTS) \
and gajim.config.get_per('accounts', self.name,
'answer_receipts') and ((contact and contact.sub \
not in (u'to', u'none')) or gc_contact):
not in (u'to', u'none')) or gc_contact) and mtype != 'error':
receipt = common.xmpp.Message(to=frm, typ='chat')
receipt.setID(msg.getID())
receipt.setTag('received',

View File

@ -892,6 +892,11 @@ class Interface:
jids = full_jid_with_resource.split('/', 1)
jid = jids[0]
if array[1] == '503':
# If we get server-not-found error, stop sending chatstates
for contact in gajim.contacts.get_contacts(account, jid):
contact.composing_xep = False
session = None
if len(array) > 5:
session = array[5]