Skip to content
Snippets Groups Projects
Commit 4b5cb86b authored by Philipp Hörist's avatar Philipp Hörist
Browse files

fix: MAM: Use full jid for MUC PMs

parent feff2cfd
No related branches found
No related tags found
No related merge requests found
......@@ -246,10 +246,9 @@ def _mam_message_received(self, _con, stanza, properties):
self._log.debug(stanza.getProperties())
return
with_ = properties.jid.bare
jid = properties.jid.new_as_bare()
if properties.is_muc_pm:
# we store the message with the full JID
with_ = str(with_)
jid = properties.jid
if properties.is_self_message:
# Self messages can only be deduped with origin-id
......@@ -260,7 +259,7 @@ def _mam_message_received(self, _con, stanza, properties):
event_attr = {
'account': self._account,
'jid': properties.jid.new_as_bare(),
'jid': jid,
'msgtxt': properties.body,
'properties': properties,
'additional_data': additional_data,
......@@ -273,13 +272,13 @@ def _mam_message_received(self, _con, stanza, properties):
correct_id = parse_correction(properties)
if correct_id is not None:
app.ged.raise_event(MessageUpdated(account=self._account,
jid=event_attr['jid'],
jid=jid,
msgtxt=properties.body,
properties=properties,
correct_id=correct_id))
app.storage.archive.store_message_correction(
self._account,
properties.jid.bare,
jid,
correct_id,
properties.body,
properties.type.is_groupchat)
......@@ -287,7 +286,7 @@ def _mam_message_received(self, _con, stanza, properties):
app.storage.archive.insert_into_logs(
self._account,
with_,
jid,
properties.mam.timestamp,
kind,
message=msgtxt,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment