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

Presence: Fix is_nickname_changed check

Check if status code is there before checking nickname, otherwise we
get a attribute error when muc_user is None
parent 14e676a6
Pipeline #7327 passed with stages
in 5 minutes and 8 seconds
......@@ -916,8 +916,8 @@ class PresenceProperties:
def is_nickname_changed(self):
return (self.from_muc and
self.muc_status_codes is not None and
self.muc_user.nick is not None and
StatusCode.NICKNAME_CHANGE in self.muc_status_codes and
self.muc_user.nick is not None and
self.type == PresenceType.UNAVAILABLE)
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