Gajim 0.16-b1 responds to carbonated receipt requests
Bug description
When Gajim (with enable_message_carbons
set) receives a carbon copy of a message with a receipt request, it sends out a receipt, even though it was not the original destination of the message.
Steps to reproduce
run Gajim as the lower-priority client on an account. Send a message from the other client to a buddy, send a message from the buddy to the higher-prio client. In both situations, Gajims sends a receipt to the buddy, instead of just doing nothing.
Example XML when message was sent from high-prio client:
\<!-- In -->
\<message type='chat' to='ACCOUNT/Gajim' from='ACCOUNT'>
\<sent xmlns='urn:xmpp:carbons:2'>
\<forwarded xmlns='urn:xmpp:forward:0'>
\<message type='chat' to='BUDDY' from='ACCOUNT/yaxim' id='51PKI-9' xmlns='jabber:client'>
\<body>Yaxim hier\</body>
\<request xmlns='urn:xmpp:receipts'/>
\</message>
\</forwarded>
\</sent>
\</message>
\<r xmlns='urn:xmpp:sm:2'/>
\<!-- Out -->
\<message xmlns="jabber:client" to="BUDDY" type="chat" id="45">
\<received xmlns="urn:xmpp:receipts" id="None" />
\</message>
Example when message was sent by BUDDY:
\<!-- In -->
\<message to='ACCOUNT/Gajim' from='ACCOUNT'>
\<sent xmlns='urn:xmpp:carbons:2'>
\<forwarded xmlns='urn:xmpp:forward:0'>
\<message id='51PKI-10' xmlns='jabber:client' to='BUDDY' from='ACCOUNT/yaxim'>
\<received id='79Ngr-14' xmlns='urn:xmpp:receipts'/>
\</message>
\</forwarded>
\</sent>
\</message>
\<!-- Out -->
\<message xmlns="jabber:client" to="BUDDY" type="chat" id="79Ngr-14">
\<received xmlns="urn:xmpp:receipts" id="79Ngr-14" />
\</message>