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 645612 - First chat message shows up twice
First chat message shows up twice
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: message-tray
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
[gnome3-important]
Depends on:
Blocks: 645609
 
 
Reported: 2011-03-23 19:22 UTC by Marina Zhurakhinskaya
Modified: 2011-03-25 22:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
telepathyClient: fix duplicate copy of first message in a chat (3.50 KB, patch)
2011-03-23 19:29 UTC, Dan Winship
committed Details | Review

Description Marina Zhurakhinskaya 2011-03-23 19:22:59 UTC
We notify on it once, but it shows up twice because it is already part of the log.
Comment 1 Dan Winship 2011-03-23 19:29:27 UTC
Created attachment 184165 [details] [review]
telepathyClient: fix duplicate copy of first message in a chat

The chat-history-fill-in code had logic to avoid appending two
messages when a message appeared in both the log and the pending
messages. But it wasn't working because of an incorrect object field
name.

Additionally, the code was previously keeping the copy of the message
from the log, and suppressing the copy from pending. But that meant
that once the previous bug was fixed, it would think it had only shown
old messages, and so it would create a source but not notify it. So
fix it to suppress the log message and show the pending message.
Comment 2 Dan Winship 2011-03-25 20:25:10 UTC
Comment on attachment 184165 [details] [review]
telepathyClient: fix duplicate copy of first message in a chat

lost in the bugzilla outage:

--- Comment #2 from Jasper St. Pierre <jstpierre@mecheye.net> 2011-03-24 11:03:31 UTC ---
Review of attachment 184165 [details] [review]:
 --> (https://bugzilla.gnome.org/review?bug=645612&attachment=184165)

LGTM, rah rah freeze break

--- Comment #3 from Jasper St. Pierre <jstpierre@mecheye.net> 2011-03-24 11:05:34 UTC ---
Review of attachment 184165 [details] [review]:
 --> (https://bugzilla.gnome.org/review?bug=645612&attachment=184165)

::: js/ui/telepathyClient.js
@@ +249,2 @@
+        let pendingTpMessages = this._channel.get_pending_messages();
+        let pendingMessages = pendingTpMessages.map(function (tpMessage) {
return makeMessageFromTpMessage(tpMessage, NotificationDirection.RECEIVED); });

style nit: break into multiple lines
Comment 3 Owen Taylor 2011-03-25 22:14:06 UTC
Review of attachment 184165 [details] [review]:

Sign off from me and +2 from release team
http://mail.gnome.org/archives/release-team/2011-March/msg00360.html
Comment 4 Dan Winship 2011-03-25 22:49:52 UTC
Attachment 184165 [details] pushed as d2de086 - telepathyClient: fix duplicate copy of first message in a chat