Commit 1af5612d authored by Philipp Hörist's avatar Philipp Hörist

Refactor parsing subject

parent 61873094
......@@ -175,6 +175,7 @@ class Message(BaseModule):
'attention': properties.attention,
'xhtml': parse_xhtml(properties),
'user_nick': properties.nickname,
'subject': properties.subject,
}
app.nec.push_incoming_event(NetworkEvent('update-client-info',
......@@ -202,13 +203,11 @@ class Message(BaseModule):
except nbxmpp.NodeProcessed:
return
subject = event.stanza.getSubject()
groupchat = event.mtype == 'groupchat'
event_attr = {
'popup': False,
'msg_log_id': None,
'subject': subject,
'displaymarking': parse_securitylabel(event.stanza),
}
......
......@@ -121,6 +121,7 @@ class ConnectionHandlersZeroconf(connection_handlers.ConnectionHandlersBase):
'attention': properties.attention,
'xhtml': parse_xhtml(properties),
'user_nick': properties.nickname,
'subject': None,
}
event = ZeroconfMessageReceivedEvent(None, **event_attr)
......@@ -142,7 +143,6 @@ class ConnectionHandlersZeroconf(connection_handlers.ConnectionHandlersBase):
event_attr = {
'popup': False,
'msg_log_id': None,
'subject': None,
'displaymarking': None,
'stanza_id': event.unique_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