aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-05-18 23:20:23 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-06-07 19:00:14 +0800
commit7b4c1e7640abf3abc27ce9d3f7b066b14557840e (patch)
treec2d7a3891821a90a932471d38de43d124ca3a8c3 /src
parentcd6ab6adeb836cbda38abc502c39d14aedfef7f1 (diff)
downloadgsoc2013-empathy-7b4c1e7640abf3abc27ce9d3f7b066b14557840e.tar
gsoc2013-empathy-7b4c1e7640abf3abc27ce9d3f7b066b14557840e.tar.gz
gsoc2013-empathy-7b4c1e7640abf3abc27ce9d3f7b066b14557840e.tar.bz2
gsoc2013-empathy-7b4c1e7640abf3abc27ce9d3f7b066b14557840e.tar.lz
gsoc2013-empathy-7b4c1e7640abf3abc27ce9d3f7b066b14557840e.tar.xz
gsoc2013-empathy-7b4c1e7640abf3abc27ce9d3f7b066b14557840e.tar.zst
gsoc2013-empathy-7b4c1e7640abf3abc27ce9d3f7b066b14557840e.zip
Join room where we have been invited when handling the channel rather than we we approve it
Diffstat (limited to 'src')
-rw-r--r--src/empathy-event-manager.c15
-rw-r--r--src/empathy.c7
2 files changed, 8 insertions, 14 deletions
diff --git a/src/empathy-event-manager.c b/src/empathy-event-manager.c
index 08f490966..2f269f573 100644
--- a/src/empathy-event-manager.c
+++ b/src/empathy-event-manager.c
@@ -536,9 +536,6 @@ invite_dialog_response_cb (GtkDialog *dialog,
EventManagerApproval *approval)
{
EmpathyTpChat *tp_chat;
- TpChannel *channel;
- TpHandle self_handle;
- GArray *members;
gint64 timestamp;
gtk_widget_destroy (GTK_WIDGET (approval->dialog));
@@ -559,15 +556,7 @@ invite_dialog_response_cb (GtkDialog *dialog,
DEBUG ("Muc invitation accepted");
- /* join the room */
- channel = empathy_tp_chat_get_channel (tp_chat);
-
- self_handle = tp_channel_group_get_self_handle (channel);
- members = g_array_sized_new (FALSE, FALSE, sizeof (TpHandle), 1);
- g_array_append_val (members, self_handle);
-
- tp_cli_channel_interface_group_call_add_members (channel, -1, members,
- "", NULL, NULL, NULL, NULL);
+ /* We'll join the room when handling the channel */
timestamp = gtk_get_current_event_time ();
if (timestamp == GDK_CURRENT_TIME)
@@ -576,8 +565,6 @@ invite_dialog_response_cb (GtkDialog *dialog,
empathy_dispatch_operation_set_user_action_time (approval->operation,
timestamp);
empathy_dispatch_operation_approve (approval->operation);
-
- g_array_free (members, TRUE);
}
static void
diff --git a/src/empathy.c b/src/empathy.c
index 5dcf035e3..9d59bba79 100644
--- a/src/empathy.c
+++ b/src/empathy.c
@@ -136,6 +136,13 @@ dispatch_cb (EmpathyDispatcher *dispatcher,
empathy_chat_window_present_chat (chat,
empathy_dispatch_operation_get_user_action_time (operation));
+ if (empathy_tp_chat_is_invited (tp_chat))
+ {
+ /* We have been invited to the room. Add ourself as member as this
+ * channel has been approved. */
+ empathy_tp_chat_join (tp_chat);
+ }
+
empathy_dispatch_operation_claim (operation);
}
else if (channel_type == TP_IFACE_QUARK_CHANNEL_TYPE_STREAMED_MEDIA)