After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 650219 - Don't update chat notifications with outgoing messages
Don't update chat notifications with outgoing messages
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: message-tray
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2011-05-15 09:10 UTC by Jonny Lamb
Modified: 2011-05-24 22:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
telepathyClient: don't update notifications for outgoing messages (1.24 KB, patch)
2011-05-15 09:10 UTC, Jonny Lamb
accepted-commit_now Details | Review

Description Jonny Lamb 2011-05-15 09:10:22 UTC
Created attachment 187840 [details] [review]
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.

Check out my patch.
Comment 1 Jasper St. Pierre (not reading bugmail) 2011-05-15 12:30:24 UTC
(In reply to comment #0)
> Created an attachment (id=187840) [details] [review]
> 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!

Is this a bad thing?

> We should only update notifications if they're incoming.
> 
> Check out my patch.
Comment 2 Jonny Lamb 2011-05-15 21:38:50 UTC
(In reply to comment #1)
> (In reply to comment #0)
> > 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!
> 
> Is this a bad thing?

Sure. I don't need the shell to notify me about the message I literally just typed. It makes it look as if the remote contact just said the same thing.
Comment 3 Jasper St. Pierre (not reading bugmail) 2011-05-18 01:47:59 UTC
Review of attachment 187840 [details] [review]:

Ah, I confused with this with another bug. Good catch :)

::: js/ui/telepathyClient.js
@@ +416,3 @@
 
+        if (message.direction == NotificationDirection.RECEIVED)
+            this.update(this.source.title, messageBody, { customContent: true, bannerMarkup: true });

Style nit, but it would be nice if you could break this line into two so it's less than 80 characters.
Comment 4 Jonny Lamb 2011-05-18 07:27:52 UTC
(In reply to comment #3)
> Style nit, but it would be nice if you could break this line into two so it's
> less than 80 characters.

Cool, thanks. I did that and merged the patch.
Comment 5 Owen Taylor 2011-05-24 22:08:03 UTC
This patch points out a bit of a ugliness in the existing code - that when filling a message with history, we're constantly calling update() and changing the banner label, and the last message happens to win and leave the banner label we want. Don't know if that's worth fixing - it probably isn't measurable performance-wise.