Always send message delivery receipts requests
- We want to send requests also to offline contacts. - The XEP is wide spread chances are high that a contact supports it. - It gets really complicated, when we want to guess if a offline contact supports receipts
This commit is contained in:
parent
d346333d2a
commit
79dc0c49f1
|
@ -49,7 +49,7 @@ from common.stanza_session import EncryptedStanzaSession, ArchivingStanzaSession
|
||||||
from common.contacts import GC_Contact
|
from common.contacts import GC_Contact
|
||||||
from common.logger import KindConstant
|
from common.logger import KindConstant
|
||||||
from nbxmpp.protocol import NS_XHTML, NS_XHTML_IM, NS_FILE, NS_MUC
|
from nbxmpp.protocol import NS_XHTML, NS_XHTML_IM, NS_FILE, NS_MUC
|
||||||
from nbxmpp.protocol import NS_RECEIPTS, NS_ESESSION
|
from nbxmpp.protocol import NS_ESESSION
|
||||||
from nbxmpp.protocol import NS_JINGLE_RTP_AUDIO, NS_JINGLE_RTP_VIDEO
|
from nbxmpp.protocol import NS_JINGLE_RTP_AUDIO, NS_JINGLE_RTP_VIDEO
|
||||||
from nbxmpp.protocol import NS_JINGLE_ICE_UDP, NS_JINGLE_FILE_TRANSFER
|
from nbxmpp.protocol import NS_JINGLE_ICE_UDP, NS_JINGLE_FILE_TRANSFER
|
||||||
from nbxmpp.protocol import NS_CHATSTATES
|
from nbxmpp.protocol import NS_CHATSTATES
|
||||||
|
@ -980,8 +980,7 @@ class ChatControl(ChatControlBase):
|
||||||
id_ = msg_stanza.getID()
|
id_ = msg_stanza.getID()
|
||||||
xep0184_id = None
|
xep0184_id = None
|
||||||
if self.contact.jid != gajim.get_jid_from_account(self.account):
|
if self.contact.jid != gajim.get_jid_from_account(self.account):
|
||||||
if self.contact.supports(NS_RECEIPTS) and gajim.config.get_per(
|
if gajim.config.get_per('accounts', self.account, 'request_receipt'):
|
||||||
'accounts', self.account, 'request_receipt'):
|
|
||||||
xep0184_id = id_
|
xep0184_id = id_
|
||||||
if label:
|
if label:
|
||||||
displaymarking = label.getTag('displaymarking')
|
displaymarking = label.getTag('displaymarking')
|
||||||
|
|
|
@ -37,11 +37,11 @@ import hashlib
|
||||||
import logging
|
import logging
|
||||||
log = logging.getLogger('gajim.c.caps_cache')
|
log = logging.getLogger('gajim.c.caps_cache')
|
||||||
|
|
||||||
from nbxmpp import (NS_XHTML_IM, NS_RECEIPTS, NS_ESESSION, NS_CHATSTATES,
|
from nbxmpp import (NS_XHTML_IM, NS_ESESSION, NS_CHATSTATES,
|
||||||
NS_JINGLE_ICE_UDP, NS_JINGLE_RTP_AUDIO, NS_JINGLE_RTP_VIDEO,
|
NS_JINGLE_ICE_UDP, NS_JINGLE_RTP_AUDIO, NS_JINGLE_RTP_VIDEO,
|
||||||
NS_JINGLE_FILE_TRANSFER)
|
NS_JINGLE_FILE_TRANSFER)
|
||||||
# Features where we cannot safely assume that the other side supports them
|
# Features where we cannot safely assume that the other side supports them
|
||||||
FEATURE_BLACKLIST = [NS_CHATSTATES, NS_XHTML_IM, NS_RECEIPTS, NS_ESESSION,
|
FEATURE_BLACKLIST = [NS_CHATSTATES, NS_XHTML_IM, NS_ESESSION,
|
||||||
NS_JINGLE_ICE_UDP, NS_JINGLE_RTP_AUDIO, NS_JINGLE_RTP_VIDEO,
|
NS_JINGLE_ICE_UDP, NS_JINGLE_RTP_AUDIO, NS_JINGLE_RTP_VIDEO,
|
||||||
NS_JINGLE_FILE_TRANSFER]
|
NS_JINGLE_FILE_TRANSFER]
|
||||||
|
|
||||||
|
|
|
@ -469,8 +469,7 @@ class CommonConnection:
|
||||||
# XEP-0184
|
# XEP-0184
|
||||||
if obj.jid != gajim.get_jid_from_account(self.name):
|
if obj.jid != gajim.get_jid_from_account(self.name):
|
||||||
if msgtxt and gajim.config.get_per('accounts', self.name,
|
if msgtxt and gajim.config.get_per('accounts', self.name,
|
||||||
'request_receipt') and contact and contact.supports(
|
'request_receipt'):
|
||||||
nbxmpp.NS_RECEIPTS):
|
|
||||||
msg_iq.setTag('request', namespace=nbxmpp.NS_RECEIPTS)
|
msg_iq.setTag('request', namespace=nbxmpp.NS_RECEIPTS)
|
||||||
|
|
||||||
if obj.forward_from:
|
if obj.forward_from:
|
||||||
|
|
Loading…
Reference in New Issue