aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy/empathy-tp-chat.c
diff options
context:
space:
mode:
authorJonny Lamb <jonnylamb@gnome.org>2011-05-13 22:23:07 +0800
committerJonny Lamb <jonnylamb@gnome.org>2011-05-13 22:25:15 +0800
commit46c85cbe83e943ce5b45fa8b66e19fe583f7d0ca (patch)
treebbf257d42fa7a918a2fff8f463de1ffb1250011b /libempathy/empathy-tp-chat.c
parent4d140c3a4e3c4629a72c3bf0ea7ca8b8ee48fb72 (diff)
downloadgsoc2013-empathy-46c85cbe83e943ce5b45fa8b66e19fe583f7d0ca.tar
gsoc2013-empathy-46c85cbe83e943ce5b45fa8b66e19fe583f7d0ca.tar.gz
gsoc2013-empathy-46c85cbe83e943ce5b45fa8b66e19fe583f7d0ca.tar.bz2
gsoc2013-empathy-46c85cbe83e943ce5b45fa8b66e19fe583f7d0ca.tar.lz
gsoc2013-empathy-46c85cbe83e943ce5b45fa8b66e19fe583f7d0ca.tar.xz
gsoc2013-empathy-46c85cbe83e943ce5b45fa8b66e19fe583f7d0ca.tar.zst
gsoc2013-empathy-46c85cbe83e943ce5b45fa8b66e19fe583f7d0ca.zip
tp-chat: call acknowledge_message(s) directly
Signed-off-by: Jonny Lamb <jonnylamb@gnome.org>
Diffstat (limited to 'libempathy/empathy-tp-chat.c')
-rw-r--r--libempathy/empathy-tp-chat.c23
1 files changed, 6 insertions, 17 deletions
diff --git a/libempathy/empathy-tp-chat.c b/libempathy/empathy-tp-chat.c
index 1d3dca765..1b45ec02a 100644
--- a/libempathy/empathy-tp-chat.c
+++ b/libempathy/empathy-tp-chat.c
@@ -94,8 +94,6 @@ G_DEFINE_TYPE_WITH_CODE (EmpathyTpChat, empathy_tp_chat, G_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE (EMPATHY_TYPE_CONTACT_LIST,
tp_chat_iface_init));
-static void acknowledge_messages (EmpathyTpChat *chat, const GList *messages);
-
static void
tp_chat_set_delivery_status (EmpathyTpChat *self,
const gchar *token,
@@ -1837,20 +1835,10 @@ empathy_tp_chat_get_pending_messages (EmpathyTpChat *chat)
return priv->pending_messages_queue->head;
}
-static void
-acknowledge_messages (EmpathyTpChat *chat,
- const GList *messages) {
- EmpathyTpChatPriv *priv = GET_PRIV (chat);
-
- tp_text_channel_ack_messages_async (TP_TEXT_CHANNEL (priv->channel),
- messages, NULL, NULL);
-}
-
void
empathy_tp_chat_acknowledge_message (EmpathyTpChat *chat,
EmpathyMessage *message) {
EmpathyTpChatPriv *priv = GET_PRIV (chat);
- GList *messages = NULL;
TpMessage *tp_msg;
g_return_if_fail (EMPATHY_IS_TP_CHAT (chat));
@@ -1860,9 +1848,8 @@ empathy_tp_chat_acknowledge_message (EmpathyTpChat *chat,
return;
tp_msg = empathy_message_get_tp_message (message);
- messages = g_list_append (messages, tp_msg);
- acknowledge_messages (chat, messages);
- g_list_free (messages);
+ tp_text_channel_ack_message_async (TP_TEXT_CHANNEL (priv->channel),
+ tp_msg, NULL, NULL);
}
void
@@ -1887,8 +1874,10 @@ empathy_tp_chat_acknowledge_messages (EmpathyTpChat *chat,
}
}
- if (messages_to_ack != NULL)
- acknowledge_messages (chat, messages_to_ack);
+ if (messages_to_ack != NULL) {
+ tp_text_channel_ack_messages_async (TP_TEXT_CHANNEL (priv->channel),
+ messages_to_ack, NULL, NULL);
+ }
g_list_free (messages_to_ack);
}