Author: asterix Date: 2008-03-24 10:16:03 +0100 (Mon, 24 Mar 2008) New Revision: 9416
Modified: trunk/src/groupchat_control.py Log: update GC_Contact instance when we change our nickname in a room. fixes #3784
Modified: trunk/src/groupchat_control.py =================================================================== --- trunk/src/groupchat_control.py 2008-03-24 00:45:53 UTC (rev 9415) +++ trunk/src/groupchat_control.py 2008-03-24 09:16:03 UTC (rev 9416) @@ -1017,18 +1017,18 @@ s = _('You are now known as %s') % new_nick else: s = _('%s is now known as %s') % (nick, new_nick) - # We add new nick to muc roster here, so we don't see - # that "new_nick has joined the room" when he just changed nick. - # add_contact_to_roster will be called a second time - # after that, but that doesn't hurt - self.add_contact_to_roster(new_nick, show, role, affiliation, - status, jid) - if nick in self.attention_list: - self.attention_list.remove(nick) - # keep nickname color - if nick in self.gc_custom_colors: - self.gc_custom_colors[new_nick] = \ - self.gc_custom_colors[nick] + # We add new nick to muc roster here, so we don't see + # that "new_nick has joined the room" when he just changed nick. + # add_contact_to_roster will be called a second time + # after that, but that doesn't hurt + self.add_contact_to_roster(new_nick, show, role, affiliation, + status, jid) + if nick in self.attention_list: + self.attention_list.remove(nick) + # keep nickname color + if nick in self.gc_custom_colors: + self.gc_custom_colors[new_nick] = \ + self.gc_custom_colors[nick] # rename vcard / avatar puny_jid = helpers.sanitize_filename(self.room_jid) puny_nick = helpers.sanitize_filename(nick)