From 79dc0c49f124b7b83e00c105fb582e7797fd8d6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20H=C3=B6rist?= Date: Mon, 10 Apr 2017 21:25:57 +0200 Subject: [PATCH] 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 --- src/chat_control.py | 5 ++--- src/common/caps_cache.py | 4 ++-- src/common/connection.py | 3 +-- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/chat_control.py b/src/chat_control.py index 5e0870eb0..83eecc57f 100644 --- a/src/chat_control.py +++ b/src/chat_control.py @@ -49,7 +49,7 @@ from common.stanza_session import EncryptedStanzaSession, ArchivingStanzaSession from common.contacts import GC_Contact from common.logger import KindConstant 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_ICE_UDP, NS_JINGLE_FILE_TRANSFER from nbxmpp.protocol import NS_CHATSTATES @@ -980,8 +980,7 @@ class ChatControl(ChatControlBase): id_ = msg_stanza.getID() xep0184_id = None if self.contact.jid != gajim.get_jid_from_account(self.account): - if self.contact.supports(NS_RECEIPTS) and gajim.config.get_per( - 'accounts', self.account, 'request_receipt'): + if gajim.config.get_per('accounts', self.account, 'request_receipt'): xep0184_id = id_ if label: displaymarking = label.getTag('displaymarking') diff --git a/src/common/caps_cache.py b/src/common/caps_cache.py index 9be689575..c0ccbd3f5 100644 --- a/src/common/caps_cache.py +++ b/src/common/caps_cache.py @@ -37,11 +37,11 @@ import hashlib import logging 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_FILE_TRANSFER) # 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_FILE_TRANSFER] diff --git a/src/common/connection.py b/src/common/connection.py index ab669f93e..5c353facf 100644 --- a/src/common/connection.py +++ b/src/common/connection.py @@ -469,8 +469,7 @@ class CommonConnection: # XEP-0184 if obj.jid != gajim.get_jid_from_account(self.name): if msgtxt and gajim.config.get_per('accounts', self.name, - 'request_receipt') and contact and contact.supports( - nbxmpp.NS_RECEIPTS): + 'request_receipt'): msg_iq.setTag('request', namespace=nbxmpp.NS_RECEIPTS) if obj.forward_from: