From 05f306115e380f915e6a6d4aeb4f640fd5fcb8e8 Mon Sep 17 00:00:00 2001 From: Jean-Marie Traissard <jim@lapin.org> Date: Sun, 11 Feb 2007 03:22:40 +0000 Subject: [PATCH] Delete change_nick() func, use join_gc() instead. Fixes #2903. --- src/common/connection.py | 9 +-------- src/groupchat_control.py | 4 ++-- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/src/common/connection.py b/src/common/connection.py index c96316d51e..4ef5536aa8 100644 --- a/src/common/connection.py +++ b/src/common/connection.py @@ -1141,7 +1141,7 @@ class Connection(ConnectionHandlers): t.setTagData('password', password) self.connection.send(p) - #last date/time in history to avoid duplicate + # last date/time in history to avoid duplicate if not self.last_history_line.has_key(room_jid): # Not in memory, get it from DB last_log = gajim.logger.get_last_date_that_has_logs(room_jid, @@ -1170,13 +1170,6 @@ class Connection(ConnectionHandlers): to = room_jid) self.connection.send(iq) - def change_gc_nick(self, room_jid, nick): - if not self.connection: - return - p = common.xmpp.Presence(to = '%s/%s' % (room_jid, nick)) - p = self.add_sha(p) - self.connection.send(p) - def send_gc_status(self, nick, jid, show, status): if not self.connection: return diff --git a/src/groupchat_control.py b/src/groupchat_control.py index 41183540fd..834583888a 100644 --- a/src/groupchat_control.py +++ b/src/groupchat_control.py @@ -1048,7 +1048,7 @@ class GroupchatControl(ChatControlBase): if len(message_array) and message_array[0] != self.nick: nick = message_array[0] nick = helpers.parse_resource(nick) - gajim.connections[self.account].change_gc_nick(self.room_jid, nick) + gajim.connections[self.account].join_gc(nick, self.room_jid, None) self.clear(self.msg_textview) else: self.get_command_help(command) @@ -1329,7 +1329,7 @@ class GroupchatControl(ChatControlBase): def on_ok(widget): nick = instance.input_entry.get_text().decode('utf-8') nick = helpers.parse_resource(nick) - gajim.connections[self.account].change_gc_nick(self.room_jid, nick) + gajim.connections[self.account].join_gc(nick, self.room_jid, None) self.nick = nick instance = dialogs.InputDialog(title, prompt, proposed_nick, is_modal = False, ok_handler = on_ok) -- GitLab