Prevent join groupchat (using local account). Fixes #6849
This commit is contained in:
		
							parent
							
								
									357a2a5b2b
								
							
						
					
					
						commit
						5fd0e076bd
					
				
					 4 changed files with 16 additions and 5 deletions
				
			
		| 
						 | 
				
			
			@ -2466,6 +2466,10 @@ class JoinGroupchatWindow:
 | 
			
		|||
 | 
			
		||||
        if self.automatic:
 | 
			
		||||
            gajim.automatic_rooms[self.account][room_jid] = self.automatic
 | 
			
		||||
        if gajim.connections[self.account].is_zeroconf:
 | 
			
		||||
            ErrorDialog(_('Impossible join groupchat'),
 | 
			
		||||
                    _('local account does not support groupchats.'))
 | 
			
		||||
            return
 | 
			
		||||
        gajim.interface.join_gc_room(self.account, room_jid, nickname,  password)
 | 
			
		||||
 | 
			
		||||
        self.window.destroy()
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -339,7 +339,8 @@ class GajimRemote:
 | 
			
		|||
        Print retrieved result to the output
 | 
			
		||||
        """
 | 
			
		||||
        if res is not None:
 | 
			
		||||
            if self.command in ('open_chat', 'send_chat_message', 'send_single_message', 'start_chat'):
 | 
			
		||||
            if self.command in ('open_chat', 'send_chat_message',
 | 
			
		||||
            'send_single_message', 'start_chat'):
 | 
			
		||||
                if self.command in ('send_message', 'send_single_message'):
 | 
			
		||||
                    self.argv_len -= 2
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1897,8 +1897,8 @@ class GroupchatControl(ChatControlBase):
 | 
			
		|||
            # logs. We do it only when connected because if connection was lost
 | 
			
		||||
            # there may be new messages since disconnection.
 | 
			
		||||
            gajim.connections[self.account].gc_got_disconnected(self.room_jid)
 | 
			
		||||
        gajim.connections[self.account].send_gc_status(self.nick, self.room_jid,
 | 
			
		||||
                                                show='offline', status=status)
 | 
			
		||||
            gajim.connections[self.account].send_gc_status(self.nick,
 | 
			
		||||
                self.room_jid, show='offline', status=status)
 | 
			
		||||
        nick_list = gajim.contacts.get_nick_list(self.account, self.room_jid)
 | 
			
		||||
        for nick in nick_list:
 | 
			
		||||
            # Update pm chat window
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -901,10 +901,16 @@ class SignalObject(dbus.service.Object):
 | 
			
		|||
            accounts = gajim.connections.keys()
 | 
			
		||||
            for acct in accounts:
 | 
			
		||||
                if gajim.account_is_connected(acct):
 | 
			
		||||
                    if not gajim.connections[acct].is_zeroconf:
 | 
			
		||||
                        account = acct
 | 
			
		||||
                        break
 | 
			
		||||
            if not account:
 | 
			
		||||
                return
 | 
			
		||||
 | 
			
		||||
        if gajim.connections[account].is_zeroconf:
 | 
			
		||||
            # zeroconf not support groupchats
 | 
			
		||||
            return
 | 
			
		||||
 | 
			
		||||
        if not nick:
 | 
			
		||||
            nick = ''
 | 
			
		||||
            gajim.interface.instances[account]['join_gc'] = \
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue