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

Simplify code and satisfy pylint

parent caa63371
......@@ -576,17 +576,18 @@ class XMPPDispatcher(PlugIn):
# If no ID then it is a whitespace
if and and ID:
# add timestamp to message stanza in queue
if stanza.getName() == 'message' and \
(stanza.getType() == 'chat' or stanza.getType() == 'groupchat'):
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(None))
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={'from': our_jid or 'Gajim',
'stamp': timestamp}) += 1
if and and ID and len( >
if len( >
return ID
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment