reply to XEP-0184 receipt requests in pm too. see #4339
This commit is contained in:
parent
eedea929a2
commit
7e5b9ab20d
|
@ -1774,13 +1774,14 @@ class ConnectionHandlers(ConnectionVcard, ConnectionBytestream, ConnectionDisco,
|
||||||
|
|
||||||
# Receipt requested
|
# Receipt requested
|
||||||
# TODO: We shouldn't answer if we're invisible!
|
# TODO: We shouldn't answer if we're invisible!
|
||||||
contact = gajim.contacts.get_contact(self.name,
|
contact = gajim.contacts.get_contact(self.name, jid)
|
||||||
common.gajim.get_room_and_nick_from_fjid(frm)[0])
|
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) \
|
if msg.getTag('request', namespace=common.xmpp.NS_RECEIPTS) \
|
||||||
and gajim.config.get_per('accounts', self.name,
|
and gajim.config.get_per('accounts', self.name,
|
||||||
'answer_receipts') and contact and contact.sub \
|
'answer_receipts') and ((contact and contact.sub \
|
||||||
not in (u'to', u'none'):
|
not in (u'to', u'none')) or gc_contact):
|
||||||
receipt = common.xmpp.Message(to = frm, typ = 'chat')
|
receipt = common.xmpp.Message(to=frm, typ='chat')
|
||||||
receipt.setID(msg.getID())
|
receipt.setID(msg.getID())
|
||||||
receipt.setTag('received',
|
receipt.setTag('received',
|
||||||
namespace='urn:xmpp:receipts')
|
namespace='urn:xmpp:receipts')
|
||||||
|
|
Loading…
Reference in New Issue