we can now re-add a contact that was ith sub=none (so not shown at all in roster)
This commit is contained in:
		
							parent
							
								
									619aaf9f73
								
							
						
					
					
						commit
						276415f570
					
				
					 1 changed files with 6 additions and 6 deletions
				
			
		| 
						 | 
				
			
			@ -460,12 +460,12 @@ _('Please fill in the data of the contact you want to add in account %s') %accou
 | 
			
		|||
			return
 | 
			
		||||
 | 
			
		||||
		# Check if jid is already in roster
 | 
			
		||||
		if jid in gajim.contacts.get_jid_list(self.account) and \
 | 
			
		||||
			_('Not in Roster') not in \
 | 
			
		||||
			gajim.contacts.get_first_contact_from_jid(self.account, jid).groups:
 | 
			
		||||
			ErrorDialog(_('Contact already in roster'),
 | 
			
		||||
			_('This contact is already listed in your roster.')).get_response()
 | 
			
		||||
			return
 | 
			
		||||
		if jid in gajim.contacts.get_jid_list(self.account):
 | 
			
		||||
			c = gajim.contacts.get_first_contact_from_jid(self.account, jid)
 | 
			
		||||
			if _('Not in Roster') not in c.groups and c.sub in ('both', 'to'):
 | 
			
		||||
				ErrorDialog(_('Contact already in roster'),
 | 
			
		||||
				_('This contact is already listed in your roster.')).get_response()
 | 
			
		||||
				return
 | 
			
		||||
 | 
			
		||||
		message_buffer = self.xml.get_widget('message_textview').get_buffer()
 | 
			
		||||
		start_iter = message_buffer.get_start_iter()
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue