GNOME Bugzilla – Bug 768611
Private messages won't go away when right click to close them
Last modified: 2016-09-09 23:15:44 UTC
If I'm in a particular chat room or in a private chat room with somebody, If someone else sends me a new private message but I don't want to respond and decide to close it immediately I do right click on the private message and select end conversation but it doesn't close it, it goes back again, it appears in the top bar notification and also on the left pane, no matter how many times I close it, it won't go away; this happens only with new private messages, previously read messages get closed after I right click on them.
Ah yeah, unless a message is acknowledged, telepathy will keep sending it. We had the same issue in gnome-shell's chat integration. To fix it, we simply acknowledge all pending messages before closing, as dismissing a message is a clear expression of intent from the user. We should simply do the same in polari.
(In reply to Florian Müllner from comment #1) > We had the same issue in gnome-shell's chat integration. I meant to point to the actual commit: https://git.gnome.org/browse/gnome-shell/commit?id=82950ecea066cf0
Created attachment 334672 [details] [review] telepathyClient: Acknowledge messages on leave While a channel has pending messages, it will pop up again when dismissed. That is clearly not what users expect, so clear them out first before leaving a channel through user action. I was hoping for some newcomer to take the bug, but after hitting this a couple of times myself, I got so annoyed that I wrote the one-liner myself :-)
(In reply to Florian Müllner from comment #3) "but after hitting this a couple of times myself, I got so annoyed that I wrote the one-liner myself :-)" What do you mean with this?
If you ignore the comment/whitespace in the attached patch, it's a single line of code. And I wrote it after the issue annoyed me a couple of times.
(In reply to Florian Müllner from comment #5) > If you ignore the comment/whitespace in the attached patch, it's a single > line of code. And I wrote it after the issue annoyed me a couple of times. ha,ha,ha! you're right, it's annoying, that's why I reported it, thank you for taking it into account...
Review of attachment 334672 [details] [review]: looks good to me.
Attachment 334672 [details] pushed as 5d07f45 - telepathyClient: Acknowledge messages on leave
Meh, one-liner my ass ...
Created attachment 335216 [details] [review] telepathyClient: Fix acknowledging pending messages on close Oh my, this is embarrassing: The actual method to remove all pending messages is ack_all_pending_messages_*async*. Commit 5d07f45190 "worked" by triggering an exception before actually leaving the channel, so the channel didn't pop up again because it was never gone in the first place (though hidden from the UI). It turns out that using the correct method doesn't fully work either here, as the ::pending-message-removed handler relies on the corresponding room which is gone when the signal is emitted. We can work around this by acknowledging messages one-by-one and running the handler manually, so do that to fix the original issue.
Review of attachment 335216 [details] [review]: tested it and reviewed it, the changes are good to me..
Attachment 335216 [details] pushed as 17d4b7c - telepathyClient: Fix acknowledging pending messages on close