[polari] telepathyClient: Acknowledge messages on leave



commit 5d07f451904d76df17e8e7a6c0fd43519a3c0c96
Author: Florian Müllner <fmuellner gnome org>
Date:   Fri Sep 2 16:16:30 2016 +0200

    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.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=768611

 src/telepathyClient.js |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/telepathyClient.js b/src/telepathyClient.js
index c4407cb..63f3a38 100644
--- a/src/telepathyClient.js
+++ b/src/telepathyClient.js
@@ -365,6 +365,10 @@ const TelepathyClient = new Lang.Class({
         if (!room.channel)
             return;
 
+        // This is a user action, so acknowledge messages to prevent
+        // mission-control from popping up the channel again
+        room.channel.ack_all_pending_messages(null);
+
         let reason = Tp.ChannelGroupChangeReason.NONE;
         message = message || _("Good Bye");
         room.channel.leave_async(reason, message, (c, res) => {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]