Commit 7d4a9b91 authored by Yann Leboulanger's avatar Yann Leboulanger

better fix for joining groupchats with uppercase letters. Fixes #9198

parent 931e3f60
......@@ -203,7 +203,12 @@ class JoinGroupchatWindow(Gtk.ApplicationWindow):
return
self.room_jid = '%s@%s' % (room, server)
self.room_jid = self.room_jid.lower()
try:
self.room_jid = helpers.parse_jid(self.room_jid)
except helpers.InvalidFormat as error:
ErrorDialog(_('Invalid JID'), str(error), transient_for=self)
return
if app.in_groupchat(account, self.room_jid):
# If we already in the groupchat, join_gc_room will bring
......@@ -223,12 +228,6 @@ class JoinGroupchatWindow(Gtk.ApplicationWindow):
ErrorDialog(_('Invalid Nickname'), str(error), transient_for=self)
return
try:
helpers.parse_jid(self.room_jid)
except helpers.InvalidFormat as error:
ErrorDialog(_('Invalid JID'), str(error), transient_for=self)
return
if not app.account_is_connected(account):
ErrorDialog(
_('You are not connected to the server'),
......
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