aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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)