Parse delay after decryption
Delay could be encrypted with full stanza encryption
This commit is contained in:
parent
08d0cde95d
commit
8a34261137
|
@ -178,10 +178,6 @@ class Message:
|
||||||
|
|
||||||
session.last_receive = time.time()
|
session.last_receive = time.time()
|
||||||
|
|
||||||
timestamp = parse_delay(stanza)
|
|
||||||
if timestamp is None:
|
|
||||||
timestamp = time.time()
|
|
||||||
|
|
||||||
event_attr = {
|
event_attr = {
|
||||||
'conn': self._con,
|
'conn': self._con,
|
||||||
'stanza': stanza,
|
'stanza': stanza,
|
||||||
|
@ -191,7 +187,6 @@ class Message:
|
||||||
'additional_data': {},
|
'additional_data': {},
|
||||||
'forwarded': forwarded,
|
'forwarded': forwarded,
|
||||||
'sent': sent,
|
'sent': sent,
|
||||||
'timestamp': timestamp,
|
|
||||||
'fjid': fjid,
|
'fjid': fjid,
|
||||||
'jid': jid,
|
'jid': jid,
|
||||||
'resource': resource,
|
'resource': resource,
|
||||||
|
@ -223,6 +218,11 @@ class Message:
|
||||||
except nbxmpp.NodeProcessed:
|
except nbxmpp.NodeProcessed:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
timestamp, delayed = parse_delay(event.stanza), True
|
||||||
|
if timestamp is None:
|
||||||
|
timestamp = time.time()
|
||||||
|
delayed = False
|
||||||
|
|
||||||
event_attr = {
|
event_attr = {
|
||||||
'popup': False,
|
'popup': False,
|
||||||
'msg_log_id': None,
|
'msg_log_id': None,
|
||||||
|
@ -234,6 +234,8 @@ class Message:
|
||||||
'form_node': parse_form(event.stanza),
|
'form_node': parse_form(event.stanza),
|
||||||
'xhtml': parse_xhtml(event.stanza),
|
'xhtml': parse_xhtml(event.stanza),
|
||||||
'chatstate': parse_chatstate(event.stanza),
|
'chatstate': parse_chatstate(event.stanza),
|
||||||
|
'timestamp': timestamp,
|
||||||
|
'delayed': delayed,
|
||||||
}
|
}
|
||||||
parse_oob(event.stanza, event.additional_data)
|
parse_oob(event.stanza, event.additional_data)
|
||||||
|
|
||||||
|
@ -245,7 +247,7 @@ class Message:
|
||||||
event.msgtxt = _('message')
|
event.msgtxt = _('message')
|
||||||
self._con.dispatch_error_message(
|
self._con.dispatch_error_message(
|
||||||
event.stanza, event.msgtxt,
|
event.stanza, event.msgtxt,
|
||||||
event.session, event.fjid, event.timestamp)
|
event.session, event.fjid, timestamp)
|
||||||
return
|
return
|
||||||
|
|
||||||
if event.mtype == 'groupchat':
|
if event.mtype == 'groupchat':
|
||||||
|
|
Loading…
Reference in New Issue