Commit ff8e7bb6 authored by Philipp Hörist's avatar Philipp Hörist
Browse files

Determine remote jid correctly in all cases

parent 35cb5c69
......@@ -40,7 +40,21 @@ class BaseMessage:
def _process_message_base(self, _con, stanza, properties):
properties.type = self._parse_type(stanza)
properties.jid = stanza.getFrom()
# Determine remote JID
if properties.is_carbon_message and properties.carbon.is_sent:
properties.jid = stanza.getTo()
elif properties.is_mam_message and not properties.type.is_groupchat:
own_jid = self._client.get_bound_jid()
if own_jid.bareMatch(stanza.getFrom()):
properties.jid = stanza.getTo()
properties.jid = stanza.getFrom()
properties.jid = stanza.getFrom() = stanza.getID()
properties.self_message = self._parse_self_message(stanza, properties)
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