fix wrong var name. fixes TBs
This commit is contained in:
		
							parent
							
								
									9f417b7396
								
							
						
					
					
						commit
						713d523344
					
				
					 1 changed files with 4 additions and 4 deletions
				
			
		| 
						 | 
					@ -71,18 +71,18 @@ class Contact:
 | 
				
			||||||
		'''if roster should not be visible in roster'''
 | 
							'''if roster should not be visible in roster'''
 | 
				
			||||||
		# JEP-0162
 | 
							# JEP-0162
 | 
				
			||||||
		hide = True
 | 
							hide = True
 | 
				
			||||||
		if contact.sub in ('both', 'to', 'from'):
 | 
							if self.sub in ('both', 'to', 'from'):
 | 
				
			||||||
			hide = False
 | 
								hide = False
 | 
				
			||||||
		elif contact.ask == 'subscribe':
 | 
							elif self.ask == 'subscribe':
 | 
				
			||||||
			hide = False
 | 
								hide = False
 | 
				
			||||||
		elif contact.name or len(contact.groups):
 | 
							elif self.name or len(self.groups):
 | 
				
			||||||
			hide = False
 | 
								hide = False
 | 
				
			||||||
		return hide
 | 
							return hide
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
	def is_observer(self):
 | 
						def is_observer(self):
 | 
				
			||||||
		# XEP-0162: http://www.xmpp.org/extensions/xep-0162.html
 | 
							# XEP-0162: http://www.xmpp.org/extensions/xep-0162.html
 | 
				
			||||||
		is_observer = False
 | 
							is_observer = False
 | 
				
			||||||
		if is_hidden_in_roster() and contact.sub == 'from':
 | 
							if self.is_hidden_from_roster() and self.sub == 'from':
 | 
				
			||||||
			is_observer = True
 | 
								is_observer = True
 | 
				
			||||||
		return is_observer
 | 
							return is_observer
 | 
				
			||||||
				
 | 
									
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue