]> git.0d.be Git - empathy.git/blobdiff - libempathy-gtk/empathy-private-chat.c
Add convinience functions empathy_chat_with_contact() and empathy_chat_with_contact_i...
[empathy.git] / libempathy-gtk / empathy-private-chat.c
index 9af944174f3aa5cbe9945feb46033bbb2b9ffa97..2dd1ba7554dc31bf68673d5f92ae966a28955a0c 100644 (file)
@@ -251,16 +251,7 @@ private_chat_contact_presence_updated_cb (EmpathyContact     *contact,
                /* If offline message is not supported by CM we need to
                 * request a new Text Channel. */
                if (!empathy_chat_is_connected (EMPATHY_CHAT (chat))) {
-                       MissionControl *mc;
-
-                       mc = empathy_mission_control_new ();
-                       mission_control_request_channel (mc,
-                                                        empathy_contact_get_account (contact),
-                                                        TP_IFACE_CHANNEL_TYPE_TEXT,
-                                                        empathy_contact_get_handle (contact),
-                                                        TP_HANDLE_TYPE_CONTACT,
-                                                        NULL, NULL);
-                       g_object_unref (mc);
+                       empathy_chat_with_contact (contact);
                }
        }