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):
|
def _on_sent(obj, msg_stanza, message, encrypted, xhtml, label):
|
||||||
id_ = msg_stanza.getID()
|
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(
|
if self.contact.supports(NS_RECEIPTS) and gajim.config.get_per(
|
||||||
'accounts', self.account, 'request_receipt'):
|
'accounts', self.account, 'request_receipt'):
|
||||||
xep0184_id = id_
|
xep0184_id = id_
|
||||||
else:
|
|
||||||
xep0184_id = None
|
|
||||||
if label:
|
if label:
|
||||||
displaymarking = label.getTag('displaymarking')
|
displaymarking = label.getTag('displaymarking')
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -467,6 +467,7 @@ class CommonConnection:
|
||||||
namespace=nbxmpp.NS_MSG_HINTS)
|
namespace=nbxmpp.NS_MSG_HINTS)
|
||||||
|
|
||||||
# XEP-0184
|
# XEP-0184
|
||||||
|
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') and contact and contact.supports(
|
||||||
nbxmpp.NS_RECEIPTS):
|
nbxmpp.NS_RECEIPTS):
|
||||||
|
|
|
@ -1174,6 +1174,8 @@ class ConnectionHandlersBase:
|
||||||
jid_to = gajim.get_jid_without_resource(fjid_to)
|
jid_to = gajim.get_jid_without_resource(fjid_to)
|
||||||
if jid_to == gajim.get_jid_from_account(self.name):
|
if jid_to == gajim.get_jid_from_account(self.name):
|
||||||
reply = True
|
reply = True
|
||||||
|
|
||||||
|
if obj.jid != gajim.get_jid_from_account(self.name):
|
||||||
if obj.receipt_request_tag and gajim.config.get_per('accounts',
|
if obj.receipt_request_tag and gajim.config.get_per('accounts',
|
||||||
self.name, 'answer_receipts') and ((contact and contact.sub \
|
self.name, 'answer_receipts') and ((contact and contact.sub \
|
||||||
not in ('to', 'none')) or gc_contact) and obj.mtype != 'error' and \
|
not in ('to', 'none')) or gc_contact) and obj.mtype != 'error' and \
|
||||||
|
|
|
@ -2734,6 +2734,7 @@ class RosterWindow:
|
||||||
typ = 'error'
|
typ = 'error'
|
||||||
if obj.forwarded and obj.sent:
|
if obj.forwarded and obj.sent:
|
||||||
typ = 'out'
|
typ = 'out'
|
||||||
|
if obj.jid != gajim.get_jid_from_account(obj.conn.name):
|
||||||
xep0184_id = obj.id_
|
xep0184_id = obj.id_
|
||||||
|
|
||||||
obj.session.control.print_conversation(obj.msgtxt, typ,
|
obj.session.control.print_conversation(obj.msgtxt, typ,
|
||||||
|
|
Loading…
Reference in New Issue