aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-02-15 17:23:21 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-05-25 15:22:41 +0800
commite74a36868d7abe9c8559567cd4e6d82ce24469af (patch)
treef2a40db6ddfe92f0d60d75582d5a8b7c4ceb2850 /src
parenta286f611ab9e53e4ddbfaa9ed915b1f39d76794a (diff)
downloadgsoc2013-empathy-e74a36868d7abe9c8559567cd4e6d82ce24469af.tar
gsoc2013-empathy-e74a36868d7abe9c8559567cd4e6d82ce24469af.tar.gz
gsoc2013-empathy-e74a36868d7abe9c8559567cd4e6d82ce24469af.tar.bz2
gsoc2013-empathy-e74a36868d7abe9c8559567cd4e6d82ce24469af.tar.lz
gsoc2013-empathy-e74a36868d7abe9c8559567cd4e6d82ce24469af.tar.xz
gsoc2013-empathy-e74a36868d7abe9c8559567cd4e6d82ce24469af.tar.zst
gsoc2013-empathy-e74a36868d7abe9c8559567cd4e6d82ce24469af.zip
event-manager: look for existing messages when approving
We may have already received some as the EmpathyTpChat is created earlier now.
Diffstat (limited to 'src')
-rw-r--r--src/empathy-event-manager.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/empathy-event-manager.c b/src/empathy-event-manager.c
index baa06dc27..c6f5860ab 100644
--- a/src/empathy-event-manager.c
+++ b/src/empathy-event-manager.c
@@ -929,6 +929,7 @@ approve_channels (TpSimpleApprover *approver,
if (TP_IS_TEXT_CHANNEL (channel))
{
EmpathyTpChat *tp_chat = EMPATHY_TP_CHAT (channel);
+ GList *messages, *l;
approval->handler_instance = g_object_ref (tp_chat);
@@ -968,6 +969,14 @@ approve_channels (TpSimpleApprover *approver,
/* 1-1 text channel, wait for the first message */
approval->handler = g_signal_connect (tp_chat, "message-received-empathy",
G_CALLBACK (event_manager_chat_message_received_cb), approval);
+
+ messages = (GList *) empathy_tp_chat_get_pending_messages (tp_chat);
+ for (l = messages; l != NULL; l = g_list_next (l))
+ {
+ EmpathyMessage *msg = l->data;
+
+ event_manager_chat_message_received_cb (tp_chat, msg, approval);
+ }
}
else if (channel_type == TP_IFACE_QUARK_CHANNEL_TYPE_STREAMED_MEDIA)
{