Philipp Hörist pushed to branch master at gajim / python-nbxmpp
Commits:
-
f6226140
by Philipp Hörist at 2017-05-30T16:51:35+02:00
1 changed file:
Changes:
| ... | ... | @@ -578,11 +578,12 @@ class XMPPDispatcher(PlugIn): |
| 578 | 578 |
# add timestamp to message stanza in queue
|
| 579 | 579 |
if (stanza.getName() == 'message' and
|
| 580 | 580 |
stanza.getType() in ('chat', 'groupchat')):
|
| 581 |
- our_jid = stanza.getAttr('from')
|
|
| 582 | 581 |
timestamp = time.strftime('%Y-%m-%dT%H:%M:%SZ', time.gmtime())
|
| 583 |
- stanza.addChild('delay', namespace=NS_DELAY2,
|
|
| 584 |
- attrs={'from': our_jid or 'Gajim',
|
|
| 585 |
- 'stamp': timestamp})
|
|
| 582 |
+ attrs = {'stamp': timestamp}
|
|
| 583 |
+ if stanza.getType() != 'groupchat':
|
|
| 584 |
+ # Dont leak our JID to Groupchats
|
|
| 585 |
+ attrs['from'] = stanza.getAttr('from')
|
|
| 586 |
+ stanza.addChild('delay', namespace=NS_DELAY2, attrs=attrs)
|
|
| 586 | 587 |
self.sm.uqueue.append(stanza)
|
| 587 | 588 |
self.sm.out_h += 1
|
| 588 | 589 |
|