Bug 94030

Summary: received messages with own id are appended to wrong log
Product: Telepathy Reporter: Ferdinand Stehle <development>
Component: loggerAssignee: Telepathy bugs list <telepathy-bugs>
Status: RESOLVED MOVED QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: normal    
Priority: medium CC: devurandom, nickbroon, sam, scott, suraia
Version: git master   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: possible fix for logger

Description Ferdinand Stehle 2016-02-07 00:27:34 UTC
Some new features for gabble, like message carbons[1] for multi client synchronizations, generate incoming messages which were sent by one of my other clients.

Currently, these messages are stored in a conversation log with my own id.

Logger should determine the destination log by the channels target, not by the messages sender. 

[1] https://bugs.freedesktop.org/show_bug.cgi?id=78093
Comment 1 diane 2016-02-07 01:11:59 UTC
I had been experimenting with telepathy-hanging (google hangouts client) with KDE Telepathy and had the problem where messages I sent on my phone showed up in KDE Telepathy's chat window with the  person I was talking to's name.

https://github.com/tiagosh/telepathy-hanging/issues/2

Seems quite similar.
Comment 3 Ferdinand Stehle 2016-02-07 17:43:22 UTC
(In reply to Alexandr Akulich from comment #2)

Your approach, using the MessageSent signal,  is definitely the cleaner one.

Unfortunately, this is not possible with current telepathy-glib, as tp_message_mixin_sent requires the message to contain a valid D-Bus invocation context by some sending application.

The current workaround is to handle the "externally sent" message as a received one, which leads to these problems in some applications.

So maybe it better to modify telepathy-glib to enable this functionality?
Comment 4 Ferdinand Stehle 2016-02-07 19:47:22 UTC
Created attachment 121576 [details] [review]
possible fix for logger

This is how I solved the problem on the logger side.
Comment 5 Alexandr Akulich 2017-04-03 08:42:20 UTC
(In reply to  Ferdinand Stehle (In reply to Ferdinand Stehle from comment #3)
> (In reply to Alexandr Akulich from comment #2)
> 
> Your approach, using the MessageSent signal,  is definitely the cleaner one.

We have the very same problem with scrollback messages, which can contain messages from selfId.

I think that scrollback should go via MessageReceived(), but then a message, (just) sent from another device has almost no difference from any other scrollback message.

To sum up:
- All received messages go through MessageReceived
- Clients should (be fixed to) correctly work with received message sender == self
- MessageSent signal should be used only for messages sent locally from this device.

See also: Bug 23844
Comment 6 GitLab Migration User 2019-12-03 19:32:32 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/telepathy/telepathy-logger/issues/42.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.