Bug 319962 - Ktp doesn't show delivery-echo messages
Summary: Ktp doesn't show delivery-echo messages
Status: CONFIRMED
Alias: None
Product: telepathy
Classification: Frameworks and Libraries
Component: text-ui (show other bugs)
Version: 0.6.1
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: Future
Assignee: Telepathy Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-17 20:38 UTC by Detlev Casanova
Modified: 2021-03-09 07:26 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Detlev Casanova 2013-05-17 20:38:59 UTC
Hello,

I use Ktp to connect to my facebook chat account and when I send a message with ktp, the message appears in the conversation on the facebook web interface but if I send the message with the facebook web interface, the message doesn't show up in ktp.
I see that dbus is aware of the message with a delivery-echo so, the message is received by telepathy on dbus but ktp won't show it.

Is it not implemented or the fact that the protocol says that an echo-delivery without a message sent from the client is considered as an error ?

The dbus-monitor output is :
signal sender=:1.1060 -> dest=(null destination) serial=1633 path=TLEPATHY_PATH; interface=org.freedesktop.Telepathy.Channel.Interface.Messages; member=MessageReceived
   array [
      array [
         dict entry(
            string "message-received"
            variant                int64 1368819160
         )
         dict entry(
            string "pending-message-id"
            variant                uint32 33
         )
         dict entry(
            string "delivery-error"
            variant                uint32 4294967295
         )
         dict entry(
            string "delivery-echo"
            variant                array [
                  array [
                     dict entry(
                        string "message-sender-id"
                        variant                            string "detlev.casanova@chat.facebook.com"
                     )
                     dict entry(
                        string "message-sender"
                        variant                            uint32 1
                     )
                  ]
                  array [
                     dict entry(
                        string "content"
                        variant                            string "MESSAGE"
                     )
                     dict entry(
                        string "content-type"
                        variant                            string "text/plain"
                     )
                  ]
               ]
         )
         dict entry(
            string "message-token"
            variant                string "TOKEN"
         )
         dict entry(
            string "message-type"
            variant                uint32 4
         )
         dict entry(
            string "delivery-status"
            variant                uint32 4
         )
         dict entry(
            string "message-sender-id"
            variant                string "ID@chat.facebook.com"
         )
         dict entry(
            string "message-sender"
            variant                uint32 394
         )
      ]
   ]


Reproducible: Always

Steps to Reproduce:
1. Send message through the facebook web chat  interface
2. the message won't show up in ktp
Comment 1 David Edmundson 2013-05-17 20:49:47 UTC
Nice investigation!

It's a bug in KTp, that I now know how to fix \o/
Comment 2 David Edmundson 2013-05-17 21:34:02 UTC
The hard part:
 - we have a delivery report on message sent on message delivery success/failure
 - if we show the echoed message on success it means we see messages sent on another client but it breaks the local case - as we now see two messages when sending locally.

Both  message tokens are different between the message we send and the delivery reports, so we have no safe way of tracking what we've shown and not.

We can't only show on the delivery report, as  we also can't on delivery reports being available for every protocol.
Comment 3 David Edmundson 2013-07-21 14:33:51 UTC
Upon further investigation it seems this will only work for Facebook. G+ does not send these delivery reports to all connected clients. They are not even getting to gabble.

DBus log of a Facebook messages:

message sent from KTp from me to friend

SENT
@aa{sv} [{"message-type": <@u 0>}, {"content": <@s "CONTENT1">, "content-type": <@s "text/plain">}]
@u 0
REPLY = @s "99347cb9-2616-4fd4-91f7-6020f4579309"

NEW MESSAGE SIGNAL
@aa{sv} [{"delivery-echo": <@aa{sv} [{"message-sender": <@u 1>, "message-sender-id": <@s "david.edmundson@chat.facebook.com">}, {"content": <@s "CONTENT1">, "content-type": <@s "text/plain">}]>, "delivery-error": <@u 4294967295>, "delivery-status": <@u 4>, "message-received": <@x 1374416574>, "message-sender": <@u 199>, "message-sender-id": <@s "-274706121@chat.facebook.com">, "message-token": <@s "4a48824a-5881-4774-b2c3-d95106f9660f">, "message-type": <@u 4>, "pending-message-id": <@u 0>}]
@aa{sv} [{"delivery-echo": <@aa{sv} [{"message-sender": <@u 1>, "message-sender-id": <@s "david.edmundson@chat.facebook.com">}, {"content": <@s "CONTENT1">, "content-type": <@s "text/plain">}]>, "delivery-error": <@u 4294967295>, "delivery-status": <@u 4>, "message-received": <@x 1374416574>, "message-sender": <@u 199>, "message-sender-id": <@s "-274706121@chat.facebook.com">, "message-token": <@s "f6de2d10-62e2-452f-a8c6-b0f3ec5a1d16">, "message-type": <@u 4>, "pending-message-id": <@u 1>}]


---
message sent from web interface from me to friend

NEW MESSAGE SIGNAL
@aa{sv} [{"delivery-echo": <@aa{sv} [{"message-sender": <@u 1>, "message-sender-id": <@s "david.edmundson@chat.facebook.com">}, {"content": <@s "CONTENT2">, "content-type": <@s "text/plain">}]>, "delivery-error": <@u 4294967295>, "delivery-status": <@u 4>, "message-received": <@x 1374416627>, "message-sender": <@u 199>, "message-sender-id": <@s "-274706121@chat.facebook.com">, "message-token": <@s "8a7eb549-b5a5-49bf-92a8-4f1791d1b2aa">, "message-type": <@u 4>, "pending-message-id": <@u 2>}]

The task is to work out how to identify the bottom echo report from either of the top two echo reports.
Comment 4 Justin Zobel 2021-03-09 07:26:11 UTC
Thank you for the bug report.

As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists.

If this bug is no longer persisting or relevant please change the status to resolved.