Add no-store hint to ChatStates
This commit is contained in:
parent
705206cf83
commit
7cb31512c6
|
@ -481,6 +481,12 @@ class CommonConnection:
|
||||||
# <body> tag is the active event
|
# <body> tag is the active event
|
||||||
if chatstate and contact and contact.supports(nbxmpp.NS_CHATSTATES):
|
if chatstate and contact and contact.supports(nbxmpp.NS_CHATSTATES):
|
||||||
msg_iq.setTag(chatstate, namespace=nbxmpp.NS_CHATSTATES)
|
msg_iq.setTag(chatstate, namespace=nbxmpp.NS_CHATSTATES)
|
||||||
|
only_chatste = False
|
||||||
|
if not msgtxt:
|
||||||
|
only_chatste = True
|
||||||
|
if only_chatste and not session.enable_encryption:
|
||||||
|
msg_iq.setTag('no-store',
|
||||||
|
namespace=nbxmpp.NS_MSG_HINTS)
|
||||||
|
|
||||||
# XEP-0184
|
# XEP-0184
|
||||||
if msgtxt and gajim.config.get_per('accounts', self.name,
|
if msgtxt and gajim.config.get_per('accounts', self.name,
|
||||||
|
@ -509,6 +515,9 @@ class CommonConnection:
|
||||||
namespace=nbxmpp.NS_MSG_HINTS)
|
namespace=nbxmpp.NS_MSG_HINTS)
|
||||||
msg_iq.addChild(name='no-copy',
|
msg_iq.addChild(name='no-copy',
|
||||||
namespace=nbxmpp.NS_MSG_HINTS)
|
namespace=nbxmpp.NS_MSG_HINTS)
|
||||||
|
if only_chatste:
|
||||||
|
msg_iq.addChild(name='no-store',
|
||||||
|
namespace=nbxmpp.NS_MSG_HINTS)
|
||||||
|
|
||||||
if callback:
|
if callback:
|
||||||
callback(jid, msg, keyID, forward_from, session, original_message,
|
callback(jid, msg, keyID, forward_from, session, original_message,
|
||||||
|
|
Loading…
Reference in New Issue