Gajim shows an "X" when the other side does not support delivery receipts
When I'm using my irssi-xmpp to talk to people using Gajim with delivery receipts enabled, they get a red "X", which makes them think the message didn't go through, instead of just not getting a green check, since my client does not support delivery receipts yet.
Activity
-
Newest first Oldest first
-
Show all activity Show comments only Show history only
- Owner
Gajim should show this red cross only when the other client announce it supports this receipts feature. Gajim don't ask for the receipts when the other side doesn't announce supporting the feature. So logs would be usefull to understand what happens. What does your client answer to disco:info? does it support caps?
- Author Contributor
Well, I'm logged in with two clients, Conversations (supports receipts) and irssi-xmpp (doesn't) -- is it possible Gajim is getting the disco that Conversations supports receipts, and then not realising this is no longer the case when the jid-locking algorithm switches to the other resource?
- Owner
Ha .. to be tested. Could you give me the priorities of your connections? and who started to talk first fom which client?
- Author Contributor
Priorities are all 0 Behaviour is consistent no matter who talks first, in my experience
- Owner
I'm not able to reproduced. I'm connected with the same clients as you, same prio, and I can't reproduce. XML logs would be usefull.
- Author Contributor
XML log from session that reproduced this. singpolyma@singpolyma.net/q10 is running Conversations (supports receipts) and singpolyma@singpolyma.net/liberty is running irssi-xmpp (does not). li@sette.ca is running Gajim
\<!-- In Thu 12 Feb 2015 07:52:21 PM EST --> \<message id='7ff93c8d-7203-4d79-8684-90253c9075c7' type='chat' to='li@sette.ca' from='singpolyma@singpolyma.net/q10'> \<markable xmlns='urn:xmpp:chat-markers:0'/> \<request xmlns='urn:xmpp:receipts'/> \<body>Hai\</body> \</message> \<!-- Out Thu 12 Feb 2015 07:52:22 PM EST --> \<message xmlns="jabber:client" to="singpolyma@singpolyma.net/q10" type="chat" id="7ff93c8d-7203-4d79-8684-90253c9075c7"> \<received xmlns="urn:xmpp:receipts" id="7ff93c8d-7203-4d79-8684-90253c9075c7" /> \</message> \<!-- In Thu 12 Feb 2015 07:52:22 PM EST --> \<message to='li@sette.ca/badwolf' from='li@sette.ca'> \<sent xmlns='urn:xmpp:carbons:2'> \<forwarded xmlns='urn:xmpp:forward:0'> \<message xmlns='jabber:client' to='singpolyma@singpolyma.net/q10' from='li@sette.ca/mobile'> \<received id='7ff93c8d-7203-4d79-8684-90253c9075c7' xmlns='urn:xmpp:chat-markers:0'/> \</message> \</forwarded> \</sent> \</message> \<!-- In Thu 12 Feb 2015 07:52:22 PM EST --> \<message to='li@sette.ca/badwolf' from='li@sette.ca'> \<sent xmlns='urn:xmpp:carbons:2'> \<forwarded xmlns='urn:xmpp:forward:0'> \<message xmlns='jabber:client' to='singpolyma@singpolyma.net/q10' from='li@sette.ca/mobile'> \<received id='7ff93c8d-7203-4d79-8684-90253c9075c7' xmlns='urn:xmpp:receipts'/> \</message> \</forwarded> \</sent> \</message> \<!-- Out Thu 12 Feb 2015 07:52:33 PM EST --> \<message xmlns="jabber:client" to="singpolyma@singpolyma.net/q10" type="chat" id="23"> \<body>reply1\</body> \<request xmlns="urn:xmpp:receipts" /> \<thread>YHXuTnNcQVSxtHSUDZAhNRlYPUIqoOKX\</thread> \</message> \<!-- In Thu 12 Feb 2015 07:52:35 PM EST --> \<message to='li@sette.ca/badwolf' from='singpolyma@singpolyma.net/q10'> \<received id='23' xmlns='urn:xmpp:receipts'/> \</message> \<!-- In Thu 12 Feb 2015 07:52:47 PM EST --> \<message id='277043676' type='chat' to='li@sette.ca/badwolf' from='singpolyma@singpolyma.net/liberty'> \<body>Hai2\</body> \<x xmlns='jabber:x:event'> \<composing/> \</x> \</message> \<!-- Out Thu 12 Feb 2015 07:52:56 PM EST --> \<message xmlns="jabber:client" to="singpolyma@singpolyma.net/liberty" type="chat" id="24"> \<body>reply2\</body> \<thread>YHXuTnNcQVSxtHSUDZAhNRlYPUIqoOKX\</thread> \</message>
The last message, reply2, shows with a red X a few moments after sending. reply1 has a green check, as it should.
- Owner
indeed as last message does not request receipts, there should not be a red cross. And I cannot reproduce with the same message ping / pong as you.
In Gajim did you closed message window in the middle?
Do you know a little python? If I ask you to modify some lines to have more debug info could you do it?
- Author Contributor
Did not close the message window, no.
Yeah, I can do some python hacking if you tell me what to look for / where to put logging.
- Owner
Nice. As a first start, could you add a print in _on_sent function in src/chat_window.py, line 2375:
def _on_sent(msg_stanza, message, encrypted, xhtml, label, old_txt): id_ = msg_stanza.getID() print self.contact, self.contact.resource print self.contact.supports(NS_RECEIPTS)
You should see 2 lines each time you send a message. Could you show me what is printed with the XML logs of what happens?
- Author Contributor
It's in chat_control.py, there is no chat_window.py (I'm on 0.6.1 now).
XML log:
\<!-- Out Wed 22 Apr 2015 08:01:36 PM EDT --> \<!-- Out Wed 22 Apr 2015 08:01:44 PM EDT --> \<iq xmlns="jabber:client" to="sette.ca" type="get" id="26"> \<ping xmlns="urn:xmpp:ping" /> \</iq> \<!-- In Wed 22 Apr 2015 08:01:44 PM EDT --> \<iq id='26' type='result' to='li@sette.ca/badwolf' from='sette.ca'/> \<!-- In Wed 22 Apr 2015 08:01:54 PM EDT --> \<message id='80419a9b-ac56-44db-b0f2-4895ee69a510' type='chat' to='li@sette.ca' from='singpolyma@singpolyma.net/q10'> \<body>From conversations\</body> \<markable xmlns='urn:xmpp:chat-markers:0'/> \<request xmlns='urn:xmpp:receipts'/> \</message> \<!-- In Wed 22 Apr 2015 08:01:55 PM EDT --> \<message to='li@sette.ca/badwolf' from='li@sette.ca'> \<sent xmlns='urn:xmpp:carbons:2'> \<forwarded xmlns='urn:xmpp:forward:0'> \<message xmlns='jabber:client' to='singpolyma@singpolyma.net/q10' from='li@sette.ca/mobile'> \<received id='80419a9b-ac56-44db-b0f2-4895ee69a510' xmlns='urn:xmpp:chat-markers:0'/> \</message> \</forwarded> \</sent> \</message> \<!-- In Wed 22 Apr 2015 08:01:55 PM EDT --> \<message to='li@sette.ca/badwolf' from='li@sette.ca'> \<sent xmlns='urn:xmpp:carbons:2'> \<forwarded xmlns='urn:xmpp:forward:0'> \<message xmlns='jabber:client' to='singpolyma@singpolyma.net/q10' from='li@sette.ca/mobile'> \<received id='80419a9b-ac56-44db-b0f2-4895ee69a510' xmlns='urn:xmpp:receipts'/> \</message> \</forwarded> \</sent> \</message> \<!-- Out Wed 22 Apr 2015 08:01:55 PM EDT --> \<message xmlns="jabber:client" to="singpolyma@singpolyma.net/q10" type="chat" id="80419a9b-ac56-44db-b0f2-4895ee69a510"> \<received xmlns="urn:xmpp:receipts" id="80419a9b-ac56-44db-b0f2-4895ee69a510" /> \</message> \<!-- Out Wed 22 Apr 2015 08:02:07 PM EDT --> \<message xmlns="jabber:client" to="singpolyma@singpolyma.net/q10" type="chat" id="27"> \<body>reply1\</body> \<request xmlns="urn:xmpp:receipts" /> \<thread>ugtirYoiOhCTiwkcQBwgNWfWWtIqBKpZ\</thread> \</message> \<!-- In Wed 22 Apr 2015 08:02:08 PM EDT --> \<message to='li@sette.ca/badwolf' from='singpolyma@singpolyma.net/q10'> \<received id='27' xmlns='urn:xmpp:receipts'/> \</message> \<!-- In Wed 22 Apr 2015 08:02:20 PM EDT --> \<message id='1682313061' type='chat' to='li@sette.ca/badwolf' from='singpolyma@singpolyma.net/novena'> \<body>from irssi\</body> \<x xmlns='jabber:x:event'> \<composing/> \</x> \</message> \<!-- Out Wed 22 Apr 2015 08:02:28 PM EDT --> \<message xmlns="jabber:client" to="singpolyma@singpolyma.net/novena" type="chat" id="28"> \<body>reply2\</body> \<thread>ugtirYoiOhCTiwkcQBwgNWfWWtIqBKpZ\</thread> \</message>
output of print statements:
\<common.contacts.Contact object at 0x7fcbcdecded0> q10 True \<common.contacts.Contact object at 0x7fcbcdecded0> q10 True
reply2 got a red X, same as before.
- Owner
In changeset 38b940ef:
update control.contact when we get a message from another resource. Fixes #7919 (closed)
Notes that might be useful.
- Show a new character colored in blue.
- Show a yellow Info Bar (
GTK_MESSAGE_INFO
) on top of chat informing user that remote end does not support delivery receipts and so Gajim can't indicate whether messages were delivered or not. This Info Bar would have two buttons: a) ButtonTell Contact
orNotify Peer
. b) ButtonClose
.
- When pressing on ButtonB, Info Bar gets closed.
- When pressing on ButtonA, Info Bar gets closed, and Gajim sends a message notifying the other end that it has no support for message delivery receipts and user (of client of remote end) should contact project administrator to ask to add support for message delivery receipts.
It appears that your messenger does not support [xep:0184 XEP-0184 Message Delivery Receipts]. Please forward this message to the project owner of your chat client to add support for Message Delivery Receipts.
Possible lines to sign the above message:
This is an automated message is brought to you by The Gajim Project.
This is a preset message is brought to you by The Gajim Project.
Chat with and speak to people over the XMPP communication network with Gajim.
EDIT: Maybe use
GTK_MESSAGE_INFO
asking whether to notify other end. a) ButtonTell Contact
orNotify Peer
. b) ButtonNot Now
.- Owner
In changeset 61648b11:
update control.contact when we get a message from another resource. Fixes #7919 (closed)