XEP-0184 uses the new caps-checking way now.
This commit is contained in:
		
							parent
							
								
									0405981b15
								
							
						
					
					
						commit
						46913c541b
					
				
					 1 changed files with 12 additions and 10 deletions
				
			
		| 
						 | 
					@ -1101,6 +1101,16 @@ class Connection(ConnectionHandlers):
 | 
				
			||||||
			msg_iq.setTag('nick', namespace = common.xmpp.NS_NICK).setData(
 | 
								msg_iq.setTag('nick', namespace = common.xmpp.NS_NICK).setData(
 | 
				
			||||||
				user_nick)
 | 
									user_nick)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							# TODO: We might want to write a function so we don't need to
 | 
				
			||||||
 | 
							#	reproduce that ugly if somewhere else.
 | 
				
			||||||
 | 
							if resource:
 | 
				
			||||||
 | 
								contact = gajim.contacts.get_contact(self.name, jid,
 | 
				
			||||||
 | 
									resource)
 | 
				
			||||||
 | 
							else:
 | 
				
			||||||
 | 
								contact = gajim.contacts. \
 | 
				
			||||||
 | 
									get_contact_with_highest_priority(self.name,
 | 
				
			||||||
 | 
									jid)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		# chatstates - if peer supports xep85 or xep22, send chatstates
 | 
							# chatstates - if peer supports xep85 or xep22, send chatstates
 | 
				
			||||||
		# please note that the only valid tag inside a message containing a <body>
 | 
							# please note that the only valid tag inside a message containing a <body>
 | 
				
			||||||
		# tag is the active event
 | 
							# tag is the active event
 | 
				
			||||||
| 
						 | 
					@ -1123,17 +1133,9 @@ class Connection(ConnectionHandlers):
 | 
				
			||||||
				'jid': forward_from})
 | 
									'jid': forward_from})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		# XEP-0184
 | 
							# XEP-0184
 | 
				
			||||||
		if resource:
 | 
					 | 
				
			||||||
			contact = gajim.contacts.get_contact(self.name, jid,
 | 
					 | 
				
			||||||
				resource)
 | 
					 | 
				
			||||||
		else:
 | 
					 | 
				
			||||||
			contact = gajim.contacts. \
 | 
					 | 
				
			||||||
				get_contact_with_highest_priority(self.name,
 | 
					 | 
				
			||||||
				jid)
 | 
					 | 
				
			||||||
		if msgtxt and gajim.config.get_per('accounts', self.name,
 | 
							if msgtxt and gajim.config.get_per('accounts', self.name,
 | 
				
			||||||
		'request_receipt') and common.xmpp.NS_RECEIPTS in \
 | 
							'request_receipt') and gajim.capscache.is_supported(contact,
 | 
				
			||||||
		gajim.capscache[(contact.caps_hash_method,
 | 
							common.xmpp.NS_RECEIPTS:
 | 
				
			||||||
		contact.caps_hash)].features:
 | 
					 | 
				
			||||||
			msg_iq.setTag('request',
 | 
								msg_iq.setTag('request',
 | 
				
			||||||
				namespace=common.xmpp.NS_RECEIPTS)
 | 
									namespace=common.xmpp.NS_RECEIPTS)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue