Dont use message receipts in message to ourself
This commit is contained in:
parent
c49d13bcae
commit
33a584b8b0
|
@ -978,11 +978,11 @@ class ChatControl(ChatControlBase):
|
|||
|
||||
def _on_sent(obj, msg_stanza, message, encrypted, xhtml, label):
|
||||
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'):
|
||||
xep0184_id = id_
|
||||
else:
|
||||
xep0184_id = None
|
||||
if label:
|
||||
displaymarking = label.getTag('displaymarking')
|
||||
else:
|
||||
|
|
|
@ -467,6 +467,7 @@ class CommonConnection:
|
|||
namespace=nbxmpp.NS_MSG_HINTS)
|
||||
|
||||
# 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):
|
||||
|
|
|
@ -1174,6 +1174,8 @@ class ConnectionHandlersBase:
|
|||
jid_to = gajim.get_jid_without_resource(fjid_to)
|
||||
if jid_to == gajim.get_jid_from_account(self.name):
|
||||
reply = True
|
||||
|
||||
if obj.jid != gajim.get_jid_from_account(self.name):
|
||||
if obj.receipt_request_tag and gajim.config.get_per('accounts',
|
||||
self.name, 'answer_receipts') and ((contact and contact.sub \
|
||||
not in ('to', 'none')) or gc_contact) and obj.mtype != 'error' and \
|
||||
|
|
|
@ -2734,6 +2734,7 @@ class RosterWindow:
|
|||
typ = 'error'
|
||||
if obj.forwarded and obj.sent:
|
||||
typ = 'out'
|
||||
if obj.jid != gajim.get_jid_from_account(obj.conn.name):
|
||||
xep0184_id = obj.id_
|
||||
|
||||
obj.session.control.print_conversation(obj.msgtxt, typ,
|
||||
|
|
Loading…
Reference in New Issue