diff options
author | Philipp Hörist <philipp@hoerist.com> | 2019-08-18 23:22:12 +0300 |
---|---|---|
committer | Philipp Hörist <philipp@hoerist.com> | 2019-08-18 23:22:12 +0300 |
commit | 0391fb0ff1b9c3f8d9a05862096a02536d389d92 (patch) | |
tree | cf026f4df10e4717aa411da4d69ab7f819e8722f /nbxmpp/structs.py | |
parent | 7a12742aefb0b4e1e3fb5bf8acccd085881d9d4c (diff) |
Presence: Add is_nickname_modified property
Diffstat (limited to 'nbxmpp/structs.py')
-rw-r--r-- | nbxmpp/structs.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/nbxmpp/structs.py b/nbxmpp/structs.py index 3ae0cea..7d9ed13 100644 --- a/nbxmpp/structs.py +++ b/nbxmpp/structs.py @@ -589,6 +589,13 @@ class PresenceProperties: StatusCode.SELF in self.muc_status_codes) @property + def is_nickname_modified(self): + return (self.from_muc and + self.muc_status_codes is not None and + StatusCode.NICKNAME_MODIFIED in self.muc_status_codes and + self.type == PresenceType.AVAILABLE) + + @property def is_nickname_changed(self): return (self.from_muc and self.muc_status_codes is not None and |