aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-chat.c
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2008-05-08 00:15:24 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2008-05-08 00:15:24 +0800
commitddd7dd1056d51059eebbfdca661ec1e794c377af (patch)
tree20350e3a82c7e2868343b060bb896f245e509e11 /libempathy-gtk/empathy-chat.c
parent48ed7c95630ad86e0d4357c92fdcda0ca2ff647b (diff)
downloadgsoc2013-empathy-ddd7dd1056d51059eebbfdca661ec1e794c377af.tar
gsoc2013-empathy-ddd7dd1056d51059eebbfdca661ec1e794c377af.tar.gz
gsoc2013-empathy-ddd7dd1056d51059eebbfdca661ec1e794c377af.tar.bz2
gsoc2013-empathy-ddd7dd1056d51059eebbfdca661ec1e794c377af.tar.lz
gsoc2013-empathy-ddd7dd1056d51059eebbfdca661ec1e794c377af.tar.xz
gsoc2013-empathy-ddd7dd1056d51059eebbfdca661ec1e794c377af.tar.zst
gsoc2013-empathy-ddd7dd1056d51059eebbfdca661ec1e794c377af.zip
Do not try to remove duplicate backlog from archives and server. Fixes bug #523918.
svn path=/trunk/; revision=1088
Diffstat (limited to 'libempathy-gtk/empathy-chat.c')
-rw-r--r--libempathy-gtk/empathy-chat.c37
1 files changed, 3 insertions, 34 deletions
diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c
index 958bb9a3b..825cb740b 100644
--- a/libempathy-gtk/empathy-chat.c
+++ b/libempathy-gtk/empathy-chat.c
@@ -73,7 +73,6 @@ typedef struct {
GSList *sent_messages;
gint sent_messages_index;
GList *compositors;
- GList *backlog_messages;
GCompletion *completion;
guint composing_stop_timeout_id;
guint block_events_timeout_id;
@@ -452,38 +451,10 @@ chat_message_received_cb (EmpathyTpChat *tp_chat,
EmpathyMessage *message,
EmpathyChat *chat)
{
- EmpathyChatPriv *priv;
+ EmpathyChatPriv *priv = GET_PRIV (chat);
EmpathyContact *sender;
- const gchar *body;
-
- priv = GET_PRIV (chat);
sender = empathy_message_get_sender (message);
- body = empathy_message_get_body (message);
- while (priv->backlog_messages) {
- EmpathyMessage *log_message;
- EmpathyContact *log_sender;
- const gchar *log_body;
-
- log_message = priv->backlog_messages->data;
- log_sender = empathy_message_get_sender (log_message);
- log_body = empathy_message_get_body (log_message);
-
- priv->backlog_messages = g_list_remove (priv->backlog_messages,
- log_message);
-
- if (empathy_contact_equal (sender, log_sender) &&
- !tp_strdiff (body, log_body)) {
- /* The message we received is already displayed because
- * some jabber chatrooms sends us back logs and we
- * already displayed it from localy logged messages. */
- DEBUG ("Skipping message because it is already "
- "displayed from logged messages");
- g_object_unref (log_message);
- return;
- }
- g_object_unref (log_message);
- }
DEBUG ("Appending new message from %s (%d)",
empathy_contact_get_name (sender),
@@ -1067,8 +1038,9 @@ chat_add_logs (EmpathyChat *chat)
for (l = messages; l; l = l->next) {
empathy_chat_view_append_message (chat->view, l->data);
+ g_object_unref (l->data);
}
- priv->backlog_messages = messages;
+ g_list_free (messages);
/* Turn back on scrolling */
empathy_chat_view_scroll (chat->view, TRUE);
@@ -1395,9 +1367,6 @@ chat_finalize (GObject *object)
g_list_foreach (priv->compositors, (GFunc) g_object_unref, NULL);
g_list_free (priv->compositors);
- g_list_foreach (priv->backlog_messages, (GFunc) g_object_unref, NULL);
- g_list_free (priv->backlog_messages);
-
chat_composing_remove_timeout (chat);
empathy_disconnect_account_status_changed (priv->token);