diff options
| author | Florian Müllner <fmuellner@gnome.org> | 2017-03-01 19:01:28 (GMT) |
|---|---|---|
| committer | Florian Müllner <fmuellner@gnome.org> | 2017-03-01 19:46:58 (GMT) |
| commit | 645aa01efd5b872ddbe1480335ae11dfbe863147 (patch) | |
| tree | f0a31ab43e80513c230931260568abf61b40a190 | |
| parent | 252dce1ec2aa0ead84d14379a624bdc0768bd286 (diff) | |
| download | gnome-shell-645aa01efd5b872ddbe1480335ae11dfbe863147.zip gnome-shell-645aa01efd5b872ddbe1480335ae11dfbe863147.tar.xz | |
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
| -rw-r--r-- | js/ui/components/telepathyClient.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/js/ui/components/telepathyClient.js b/js/ui/components/telepathyClient.js index f1fe09f..1cd8e61 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() { |