Commit cb97b189 authored by Philipp Hörist's avatar Philipp Hörist

MUC: Change nick only on self presence

parent 8db35fdb
Pipeline #3995 passed with stages
in 2 minutes and 38 seconds
......@@ -371,13 +371,14 @@ class MUC(BaseModule):
properties.muc_nickname)
if properties.is_nickname_changed:
if properties.is_muc_self_presence:
muc_data.nick = properties.muc_user.nick
app.contacts.remove_gc_contact(self._account, contact)
contact.name = properties.muc_user.nick
app.contacts.add_gc_contact(self._account, contact)
self._log.info('Nickname changed: %s to %s',
properties.jid,
properties.muc_user.nick)
muc_data.nick = properties.muc_user.nick
self._raise_muc_event('muc-nickname-changed', properties)
return
......
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