From 0d92f2b0c562a64a17d854580f0fba372b1726ec Mon Sep 17 00:00:00 2001 From: Jonny Lamb Date: Sun, 15 May 2011 10:07:23 +0100 Subject: [PATCH] telepathyClient: don't update notifications for outgoing messages If you receive a message, a notification will appear. If you reply in Empathy's chat window before the notification disappears, the notification is updated with the contents of the message you *just* sent! We should only update notifications if they're incoming. https://bugzilla.gnome.org/show_bug.cgi?id=650219 Signed-off-by: Jonny Lamb --- js/ui/telepathyClient.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/js/ui/telepathyClient.js b/js/ui/telepathyClient.js index 0a3f6b724..670416da0 100644 --- a/js/ui/telepathyClient.js +++ b/js/ui/telepathyClient.js @@ -416,7 +416,11 @@ Notification.prototype = { styles.push('chat-action'); } - this.update(this.source.title, messageBody, { customContent: true, bannerMarkup: true }); + if (message.direction == NotificationDirection.RECEIVED) { + this.update(this.source.title, messageBody, { customContent: true, + bannerMarkup: true }); + } + this._append(messageBody, styles, message.timestamp, noTimestamp); },