better fix for joining groupchats with uppercase letters. Fixes #9198
This commit is contained in:
		
							parent
							
								
									f25634bff5
								
							
						
					
					
						commit
						3305ad7710
					
				
					 1 changed files with 6 additions and 7 deletions
				
			
		| 
						 | 
				
			
			@ -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'),
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue