[polari] chatView: Fix outgoing check when acknowledging message
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari] chatView: Fix outgoing check when acknowledging message
- Date: Sun, 31 Jul 2016 00:01:24 +0000 (UTC)
commit 1faedd176c5518808b499e23d8978abdb0b9aaae
Author: Florian Müllner <fmuellner gnome org>
Date: Sun Jul 31 00:20:46 2016 +0200
chatView: Fix outgoing check when acknowledging message
All outgoing messages have a pending ID of 0, but it may also be a valid
ID for incoming ones. So instead of checking whether the ID itself is
"true-ish" (which isn't the case for 0), test explicitly for undefined.
https://bugzilla.gnome.org/show_bug.cgi?id=769339
src/chatView.js | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/chatView.js b/src/chatView.js
index 1f8bf4a..ccb4d96 100644
--- a/src/chatView.js
+++ b/src/chatView.js
@@ -1229,7 +1229,7 @@ const ChatView = new Lang.Class({
notification);
}
- if (!message.pendingId /* outgoing */ ||
+ if (message.pendingId == undefined /* outgoing */ ||
(this._active && this._toplevelFocus && this._pending.size == 0))
this._channel.ack_message_async(tpMessage, null);
else if (this._needsIndicator)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]