Correctly search for chat_control when message receipts are received (XEP-0184) and chat_control is not currently bound to a session
This commit is contained in:
		
							parent
							
								
									638843ba08
								
							
						
					
					
						commit
						55eaf70f9f
					
				
					 1 changed files with 6 additions and 5 deletions
				
			
		| 
						 | 
					@ -1203,11 +1203,12 @@ class ConnectionHandlersBase:
 | 
				
			||||||
        self.name, 'request_receipt'):
 | 
					        self.name, 'request_receipt'):
 | 
				
			||||||
            ctrl = obj.session.control
 | 
					            ctrl = obj.session.control
 | 
				
			||||||
            if not ctrl:
 | 
					            if not ctrl:
 | 
				
			||||||
                # Received <message> doesn't have the <thread> element?
 | 
					                # Received <message> doesn't have the <thread> element
 | 
				
			||||||
                # search in all sessions
 | 
					                # or control is not bound to session?
 | 
				
			||||||
                for s in self.get_sessions(obj.jid):
 | 
					                # --> search for it
 | 
				
			||||||
                    if s.control:
 | 
					                ctrl = gajim.interface.msg_win_mgr.search_control(obj.jid,
 | 
				
			||||||
                        ctrl = s.control
 | 
					                    obj.conn.name, obj.resource)
 | 
				
			||||||
 | 
					            
 | 
				
			||||||
            if ctrl:
 | 
					            if ctrl:
 | 
				
			||||||
                id_ = obj.receipt_received_tag.getAttr('id')
 | 
					                id_ = obj.receipt_received_tag.getAttr('id')
 | 
				
			||||||
                if not id_:
 | 
					                if not id_:
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue