Commit 674b4f57 authored by jimpp's avatar jimpp

Readd part of [8904] removed in [8938]. Then mix them. So we fix #3495/#3506...

Readd part of [8904] removed in [8938]. Then mix them. So we fix #3495/#3506 and problem when connecting
with an already used nick.
Fixes problem when we change nick with dialog to an already used one and then cancel. Fixes #3506.
parent a8666e15
......@@ -1537,9 +1537,18 @@ class GroupchatControl(ChatControlBase):
_('The nickname has not allowed characters.'))
gajim.connections[self.account].join_gc(nick, self.room_jid, None)
self.nick = nick
if gajim.gc_connected[self.account][self.room_jid]:
# We are changing nick, we will change self.nick when we receive
# presence that inform that it works
self.new_nick = nick
# We are connecting, we will not get a changed nick presence so
# change it NOW. We don't already have a nick so it's harmless
self.nick = nick
def on_cancel():
self.new_nick = ''
instance = dialogs.InputDialog(title, prompt, proposed_nick,
is_modal = False, ok_handler = on_ok)
is_modal = False, ok_handler = on_ok, cancel_handler = on_cancel)
def minimize(self, status='offline'):
# Minimize it
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