From 645aa01efd5b872ddbe1480335ae11dfbe863147 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Wed, 1 Mar 2017 20:01:28 +0100 Subject: [PATCH] telepathyClient: Use a single update for text and timestamp Commit c6f22826cf added a call to update() to refresh the notification time for sent and received messages. However as it omits the bannerMarkup parameter, escaped text like ''' now makes it through verbatim. Rather than adding the parameter, we can just refresh the timestamp in the existing update() call to fix the issue - it means the notification timestamp is only refreshed for received messages, but that reflects the text shown in the notification, which isn't updated for sent messages either. https://bugzilla.gnome.org/show_bug.cgi?id=779435 --- js/ui/components/telepathyClient.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/ui/components/telepathyClient.js b/js/ui/components/telepathyClient.js index f1fe09f95..1cd8e61bd 100644 --- a/js/ui/components/telepathyClient.js +++ b/js/ui/components/telepathyClient.js @@ -660,7 +660,9 @@ const ChatNotification = new Lang.Class({ } if (message.direction == NotificationDirection.RECEIVED) - this.update(this.source.title, messageBody, { bannerMarkup: true }); + this.update(this.source.title, messageBody, + { datetime: GLib.DateTime.new_from_unix_local (message.timestamp), + bannerMarkup: true }); let group = (message.direction == NotificationDirection.RECEIVED ? 'received' : 'sent'); @@ -670,8 +672,6 @@ const ChatNotification = new Lang.Class({ styles: styles, timestamp: message.timestamp, noTimestamp: noTimestamp }); - this.update(this.title, this.bannerBodyText, - { datetime: GLib.DateTime.new_from_unix_local (message.timestamp) }); }, _filterMessages: function() {