]> git.0d.be Git - empathy.git/blobdiff - src/empathy-event-manager.c
event_manager_approve_channel_cb: empathy_tp_chat_get_account doesn't ref the object
[empathy.git] / src / empathy-event-manager.c
index f8795b801dcf8e8d01b89a4055b8e3debcaa81c3..ef9248647d6fd3bb234c094c3a4625446c77f211 100644 (file)
@@ -639,8 +639,8 @@ invite_dialog_response_cb (GtkDialog *dialog,
 {
   EmpathyTpChat *tp_chat;
   TpChannel *channel;
 {
   EmpathyTpChat *tp_chat;
   TpChannel *channel;
-  EmpathyTpGroup *group;
-  EmpathyContact *self_contact;
+  TpHandle self_handle;
+  GArray *members;
 
   gtk_widget_destroy (GTK_WIDGET (approval->dialog));
   approval->dialog = NULL;
 
   gtk_widget_destroy (GTK_WIDGET (approval->dialog));
   approval->dialog = NULL;
@@ -664,16 +664,16 @@ invite_dialog_response_cb (GtkDialog *dialog,
   /* join the room */
   channel = empathy_tp_chat_get_channel (tp_chat);
 
   /* join the room */
   channel = empathy_tp_chat_get_channel (tp_chat);
 
-  group = empathy_tp_group_new (channel);
-  empathy_run_until_ready (group);
+  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);
 
 
-  self_contact = empathy_tp_group_get_self_contact (group);
-  empathy_tp_group_add_member (group, self_contact, NULL);
+  tp_cli_channel_interface_group_call_add_members (channel, -1, members,
+      "", NULL, NULL, NULL, NULL);
 
   empathy_dispatch_operation_approve (approval->operation);
 
 
   empathy_dispatch_operation_approve (approval->operation);
 
-  g_object_unref (group);
-  g_object_unref (self_contact);
+  g_array_free (members, TRUE);
 }
 
 static void
 }
 
 static void
@@ -737,7 +737,7 @@ event_manager_muc_invite_got_contact_name_cb (EmpathyContact *contact,
   tp_channel_group_get_local_pending_info (channel, self_handle, NULL, NULL,
       &invite_msg);
 
   tp_channel_group_get_local_pending_info (channel, self_handle, NULL, NULL,
       &invite_msg);
 
-  msg = g_strdup_printf ("%s invited you to join %s",
+  msg = g_strdup_printf (_("%s invited you to join %s"),
       empathy_contact_get_name (approval->contact),
       tp_channel_get_identifier (channel));
 
       empathy_contact_get_name (approval->contact),
       tp_channel_get_identifier (channel));
 
@@ -820,7 +820,6 @@ event_manager_approve_channel_cb (EmpathyDispatcher *dispatcher,
             G_OBJECT (manager));
 
           g_object_unref (contact_factory);
             G_OBJECT (manager));
 
           g_object_unref (contact_factory);
-          g_object_unref (account);
         }
     }
   else if (!tp_strdiff (channel_type, TP_IFACE_CHANNEL_TYPE_STREAMED_MEDIA))
         }
     }
   else if (!tp_strdiff (channel_type, TP_IFACE_CHANNEL_TYPE_STREAMED_MEDIA))