Commit f6226140 authored by Philipp Hörist's avatar Philipp Hörist

Dont leak JID to groupchats on resending messages

parent 9cfe6015
......@@ -578,11 +578,12 @@ class XMPPDispatcher(PlugIn):
# add timestamp to message stanza in queue
if (stanza.getName() == 'message' and
stanza.getType() in ('chat', 'groupchat')):
our_jid = stanza.getAttr('from')
timestamp = time.strftime('%Y-%m-%dT%H:%M:%SZ', time.gmtime())
stanza.addChild('delay', namespace=NS_DELAY2,
attrs={'from': our_jid or 'Gajim',
'stamp': timestamp})
attrs = {'stamp': timestamp}
if stanza.getType() != 'groupchat':
# Dont leak our JID to Groupchats
attrs['from'] = stanza.getAttr('from')
stanza.addChild('delay', namespace=NS_DELAY2, attrs=attrs) += 1
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment