Commit 74ac7653 authored by Philipp Hörist's avatar Philipp Hörist

Remove nick attribute from mam-decrypted-message-received event

It's available via properties attribute
parent 2e266601
......@@ -250,7 +250,7 @@ class MAM(BaseModule):
event_attrs['kind'],
unread=False,
message=msgtxt,
contact_name=event_attrs['nick'],
contact_name=properties.muc_nickname,
additional_data=additional_data,
stanza_id=stanza_id,
message_id=properties.id)
......@@ -264,7 +264,6 @@ class MAM(BaseModule):
if properties.muc_user is not None:
real_jid = properties.muc_user.jid
return {'with_': properties.jid,
'nick': properties.muc_nickname,
'real_jid': real_jid,
'kind': KindConstant.GC_MSG}
......@@ -275,7 +274,6 @@ class MAM(BaseModule):
kind = KindConstant.CHAT_MSG_RECV
return {'with_': properties.jid,
'nick': None,
'kind': kind}
def _is_valid_request(self, properties):
......
......@@ -820,7 +820,7 @@ class GroupchatControl(ChatControlBase):
if obj.archive_jid != self.room_jid:
return
self.add_message(obj.msgtxt,
contact=obj.nick,
contact=obj.properties.muc_nickname,
tim=obj.properties.mam.timestamp,
correct_id=obj.correct_id,
message_id=obj.properties.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