Commit 700747e0 authored by Philipp Hörist's avatar Philipp Hörist

Remove subject attribute from decrypted-message event

It's available via properties attribute
parent 02999050
......@@ -819,7 +819,7 @@ class ChatControl(ChatControlBase):
typ = 'out'
self.add_message(obj.msgtxt, typ,
tim=obj.timestamp, subject=obj.subject,
tim=obj.timestamp, subject=obj.properties.subject,
xhtml=obj.xhtml, displaymarking=obj.displaymarking,
msg_log_id=obj.msg_log_id, message_id=obj.message_id,
correct_id=obj.correct_id,
......
......@@ -196,7 +196,6 @@ class Message(BaseModule):
'attention': properties.attention,
'xhtml': xhtml,
'user_nick': properties.nickname,
'subject': properties.subject,
'popup': False,
'msg_log_id': None,
'displaymarking': parse_securitylabel(stanza),
......
......@@ -111,7 +111,6 @@ class ConnectionHandlersZeroconf(connection_handlers.ConnectionHandlersBase):
'attention': properties.attention,
'xhtml': parse_xhtml(properties),
'user_nick': properties.nickname,
'subject': None,
'popup': False,
'msg_log_id': None,
'displaymarking': None,
......
......@@ -378,7 +378,7 @@ class GajimRemote(Server):
event_type = 'pm'
self.raise_signal('NewMessage', (
obj.conn.name, [obj.fjid, obj.msgtxt, obj.timestamp,
event_type, obj.subject,
event_type, obj.properties.subject,
obj.msg_log_id, obj.user_nick, obj.xhtml]))
def on_our_status(self, obj):
......
......@@ -119,7 +119,7 @@ class ChatControlSession:
obj.msg_log_id = app.logger.insert_into_logs(
self.conn.name, jid, obj.timestamp, log_type,
message=msg_to_log,
subject=obj.subject,
subject=obj.properties.subject,
additional_data=obj.additional_data,
stanza_id=obj.unique_id,
message_id=obj.message_id)
......@@ -225,8 +225,12 @@ class ChatControlSession:
do_event = True
if do_event:
kind = obj.properties.type.value
event = event_t(obj.msgtxt, obj.subject, kind, obj.timestamp,
obj.resource, obj.msg_log_id,
event = event_t(
obj.msgtxt,
obj.properties.subject,
kind, obj.timestamp,
obj.resource,
obj.msg_log_id,
correct_id=obj.correct_id,
message_id=obj.message_id,
xhtml=obj.xhtml,
......
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