[polari] chatView: Fix check for outgoing message
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari] chatView: Fix check for outgoing message
- Date: Wed, 30 Oct 2013 05:10:40 +0000 (UTC)
commit b773dc368707445118931af8723f3f4e23bb2243
Author: Florian Müllner <fmuellner gnome org>
Date: Wed Oct 30 04:14:30 2013 +0100
chatView: Fix check for outgoing message
Outgoing messages will always have a pending ID of 0, but 0 is also
a valid ID for incoming messages - we need to check the additional
bool return value to differentiate between the two cases.
src/chatView.js | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/chatView.js b/src/chatView.js
index db93453..c93b0c0 100644
--- a/src/chatView.js
+++ b/src/chatView.js
@@ -429,8 +429,8 @@ const ChatView = new Lang.Class({
let buffer = this._view.get_buffer();
- let [id,] = message.get_pending_message_id();
- if (id == 0 /* outgoing */ ||
+ let [id, valid] = message.get_pending_message_id();
+ if (!valid /* outgoing */ ||
(this._active && this._toplevelFocus && this._nPending == 0)) {
this._room.channel.ack_message_async(message, null);
} else if (shouldHighlight) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]