After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 768611 - Private messages won't go away when right click to close them
Private messages won't go away when right click to close them
Status: RESOLVED FIXED
Product: polari
Classification: Applications
Component: general
3.20.x
Other Linux
: Normal normal
: ---
Assigned To: Polari maintainers
Polari maintainers
Depends on:
Blocks:
 
 
Reported: 2016-07-09 16:17 UTC by Ricardo Ramos
Modified: 2016-09-09 23:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
telepathyClient: Acknowledge messages on leave (1.14 KB, patch)
2016-09-02 19:34 UTC, Florian Müllner
committed Details | Review
telepathyClient: Fix acknowledging pending messages on close (2.16 KB, patch)
2016-09-09 21:52 UTC, Florian Müllner
committed Details | Review

Description Ricardo Ramos 2016-07-09 16:17:38 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.
Comment 1 Florian Müllner 2016-07-09 19:03:06 UTC
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.
Comment 2 Florian Müllner 2016-07-09 19:03:36 UTC
(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
Comment 3 Florian Müllner 2016-09-02 19:34:27 UTC
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 :-)
Comment 4 Ricardo Ramos 2016-09-02 21:33:20 UTC
(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?
Comment 5 Florian Müllner 2016-09-02 21:37:16 UTC
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.
Comment 6 Ricardo Ramos 2016-09-02 21:42:02 UTC
(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...
Comment 7 Bastian Ilsø 2016-09-07 20:01:37 UTC
Review of attachment 334672 [details] [review]:

looks good to me.
Comment 8 Florian Müllner 2016-09-07 20:05:01 UTC
Attachment 334672 [details] pushed as 5d07f45 - telepathyClient: Acknowledge messages on leave
Comment 9 Florian Müllner 2016-09-09 21:52:23 UTC
Meh, one-liner my ass ...
Comment 10 Florian Müllner 2016-09-09 21:52:54 UTC
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.
Comment 11 Bastian Ilsø 2016-09-09 22:56:33 UTC
Review of attachment 335216 [details] [review]:

tested it and reviewed it, the changes are good to me..
Comment 12 Florian Müllner 2016-09-09 23:15:37 UTC
Attachment 335216 [details] pushed as 17d4b7c - telepathyClient: Fix acknowledging pending messages on close