prevent bug when merging metacontacts
This commit is contained in:
		
							parent
							
								
									f9dbe1b4d6
								
							
						
					
					
						commit
						406e142b25
					
				
					 1 changed files with 3 additions and 0 deletions
				
			
		| 
						 | 
					@ -3988,6 +3988,9 @@ class RosterWindow:
 | 
				
			||||||
				_account = data['account']
 | 
									_account = data['account']
 | 
				
			||||||
				_jid = data['jid']
 | 
									_jid = data['jid']
 | 
				
			||||||
				_contact = gajim.contacts.get_first_contact_from_jid(_account, _jid)
 | 
									_contact = gajim.contacts.get_first_contact_from_jid(_account, _jid)
 | 
				
			||||||
 | 
									if not _contact:
 | 
				
			||||||
 | 
										# One of the metacontacts may be not connected.
 | 
				
			||||||
 | 
										continue
 | 
				
			||||||
 | 
					
 | 
				
			||||||
				_contact.groups = c_dest.groups[:]
 | 
									_contact.groups = c_dest.groups[:]
 | 
				
			||||||
				gajim.contacts.add_metacontact(account_dest, c_dest.jid,
 | 
									gajim.contacts.add_metacontact(account_dest, c_dest.jid,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue