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 <jonnylamb@gnome.org>
This commit is contained in:
Jonny Lamb 2011-05-15 10:07:23 +01:00 committed by Owen W. Taylor
parent 2afb4cc124
commit 0d92f2b0c5

View File

@ -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);
},