prevent traceback in case a groupchat comes in roster. fixes #4362
This commit is contained in:
		
							parent
							
								
									71fd779844
								
							
						
					
					
						commit
						5795a27162
					
				
					 2 changed files with 7 additions and 3 deletions
				
			
		|  | @ -1034,7 +1034,10 @@ class MessageWindowMgr(gobject.GObject): | |||
| 	def get_gc_control(self, jid, acct): | ||||
| 		'''Same as get_control. Was briefly required, is not any more. | ||||
| May be useful some day in the future?''' | ||||
| 		return self.get_control(jid, acct) | ||||
| 		ctrl = self.get_control(jid, acct) | ||||
| 		if ctrl.type_id == message_control.TYPE_GC: | ||||
| 			return ctrl | ||||
| 		return None | ||||
| 
 | ||||
| 	def get_controls(self, type = None, acct = None): | ||||
| 		ctrls = [] | ||||
|  |  | |||
|  | @ -2075,8 +2075,9 @@ class RosterWindow: | |||
| 					gajim.con_types[account] = None | ||||
| 				for jid in gajim.contacts.get_jid_list(account): | ||||
| 					lcontact = gajim.contacts.get_contacts(account, jid) | ||||
| 					for contact in [c for c in lcontact if (c.show != 'offline' or | ||||
| 					c.is_transport())]: | ||||
| 					ctrl = gajim.interface.msg_win_mgr.get_gc_control(jid, account) | ||||
| 					for contact in [c for c in lcontact if ((c.show != 'offline' or | ||||
| 					c.is_transport()) and not ctrl)]: | ||||
| 						self.chg_contact_status(contact, 'offline', '', account) | ||||
| 			self.actions_menu_needs_rebuild = True | ||||
| 		self.update_status_combobox() | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue