stringprep nickname when we want to change nick in a room. fixes #2605

This commit is contained in:
Yann Leboulanger 2007-01-31 21:31:10 +00:00
parent f079604c15
commit a794812ea5
1 changed files with 2 additions and 0 deletions

View File

@ -1048,6 +1048,7 @@ class GroupchatControl(ChatControlBase):
# example: /nick foo # example: /nick foo
if len(message_array) and message_array[0] != self.nick: if len(message_array) and message_array[0] != self.nick:
nick = message_array[0] nick = message_array[0]
nick = helpers.parse_resource(nick)
gajim.connections[self.account].change_gc_nick(self.room_jid, nick) gajim.connections[self.account].change_gc_nick(self.room_jid, nick)
self.clear(self.msg_textview) self.clear(self.msg_textview)
else: else:
@ -1327,6 +1328,7 @@ class GroupchatControl(ChatControlBase):
'''asks user for new nick and on ok it sets it on room''' '''asks user for new nick and on ok it sets it on room'''
def on_ok(widget): def on_ok(widget):
nick = instance.input_entry.get_text().decode('utf-8') 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].change_gc_nick(self.room_jid, nick)
self.nick = nick self.nick = nick
instance = dialogs.InputDialog(title, prompt, proposed_nick, instance = dialogs.InputDialog(title, prompt, proposed_nick,