reply to XEP-0184 receipt requests in pm too. see #4339

This commit is contained in:
Yann Leboulanger 2008-09-27 18:04:29 +00:00
parent eedea929a2
commit 7e5b9ab20d
1 changed files with 6 additions and 5 deletions

View File

@ -1774,13 +1774,14 @@ class ConnectionHandlers(ConnectionVcard, ConnectionBytestream, ConnectionDisco,
# Receipt requested
# TODO: We shouldn't answer if we're invisible!
contact = gajim.contacts.get_contact(self.name,
common.gajim.get_room_and_nick_from_fjid(frm)[0])
contact = gajim.contacts.get_contact(self.name, jid)
nick = gajim.get_room_and_nick_from_fjid(frm)[1]
gc_contact = gajim.contacts.get_gc_contact(self.name, jid, nick)
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'):
receipt = common.xmpp.Message(to = frm, typ = 'chat')
'answer_receipts') and ((contact and contact.sub \
not in (u'to', u'none')) or gc_contact):
receipt = common.xmpp.Message(to=frm, typ='chat')
receipt.setID(msg.getID())
receipt.setTag('received',
namespace='urn:xmpp:receipts')