Some new features for gabble, like message carbons 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.
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.
Seems quite similar.
This used to work with Telepathy-Morse — I implemented it via http://telepathy.freedesktop.org/spec/Channel_Interface_Messages.html#Signal:MessageSent here https://github.com/TelepathyQt/telepathy-morse/blob/master/textchannel.cpp#L174.
(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?
Created attachment 121576 [details] [review]
possible fix for logger
This is how I solved the problem on the logger side.
(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
-- 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.