ignore groupchat invitations from contacts that are not in roster if ignore_unknown_contacts is enabled. Fixes #6057
This commit is contained in:
		
							parent
							
								
									49a797dd54
								
							
						
					
					
						commit
						d8b9fe08a6
					
				
					 1 changed files with 5 additions and 0 deletions
				
			
		| 
						 | 
					@ -1007,6 +1007,11 @@ class GcInvitationReceivedEvent(nec.NetworkIncomingEvent):
 | 
				
			||||||
        except helpers.InvalidFormat:
 | 
					        except helpers.InvalidFormat:
 | 
				
			||||||
            log.warn('Invalid JID: %s, ignoring it' % item.getAttr('from'))
 | 
					            log.warn('Invalid JID: %s, ignoring it' % item.getAttr('from'))
 | 
				
			||||||
            return
 | 
					            return
 | 
				
			||||||
 | 
					        jid = gajim.get_jid_without_resource(self.jid_from)
 | 
				
			||||||
 | 
					        if gajim.config.get_per('accounts', self.conn.name,
 | 
				
			||||||
 | 
					        'ignore_unknown_contacts') and not gajim.contacts.get_contacts(
 | 
				
			||||||
 | 
					        self.conn.name, jid):
 | 
				
			||||||
 | 
					            return
 | 
				
			||||||
        self.reason = item.getTagData('reason')
 | 
					        self.reason = item.getTagData('reason')
 | 
				
			||||||
        self.password = self.msg_obj.invite_tag.getTagData('password')
 | 
					        self.password = self.msg_obj.invite_tag.getTagData('password')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue