diff options
author | Philipp Hörist <philipp@hoerist.com> | 2019-10-06 00:50:51 +0300 |
---|---|---|
committer | Philipp Hörist <philipp@hoerist.com> | 2019-10-06 00:52:59 +0300 |
commit | 6a89fcfbd803d6a8cba202a5456dec8e7a49d43d (patch) | |
tree | 6abeac7163d754a78fc5fb186fcc2c7ed22d1ed8 | |
parent | ff8e7bb66682565ad6d5cc3023612b506502cef9 (diff) |
Message Properties: Expose from and to attribute
-rw-r--r-- | nbxmpp/modules/message.py | 2 | ||||
-rw-r--r-- | nbxmpp/structs.py | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/nbxmpp/modules/message.py b/nbxmpp/modules/message.py index 6385868..96c5384 100644 --- a/nbxmpp/modules/message.py +++ b/nbxmpp/modules/message.py @@ -55,6 +55,8 @@ class BaseMessage: else: properties.jid = stanza.getFrom() + properties.from_ = stanza.getFrom() + properties.to = stanza.getTo() properties.id = stanza.getID() properties.self_message = self._parse_self_message(stanza, properties) diff --git a/nbxmpp/structs.py b/nbxmpp/structs.py index c9453ee..5f2889a 100644 --- a/nbxmpp/structs.py +++ b/nbxmpp/structs.py @@ -495,6 +495,8 @@ class MessageProperties: self.type = MessageType.NORMAL self.id = None self.stanza_id = None + self.from_ = None + self.to = None self.jid = None self.subject = None self.body = None |