+ handle_name_value = g_hash_table_lookup (info, "handle-name");
+
+ if (tp_strdiff (channel_type, TP_IFACE_CHANNEL_TYPE_TEXT)) {
+ continue;
+ }
+
+ chatroom = g_object_new (EMPATHY_TYPE_CHATROOM,
+ "account", priv->account,
+ NULL);
+
+ if (room_name_value) {
+ str = g_value_get_string (room_name_value);
+ empathy_chatroom_set_name (chatroom, str);
+ }
+
+ if (handle_name_value) {
+ str = g_value_get_string (handle_name_value);
+ empathy_chatroom_set_room (chatroom, str);
+
+ /* Room is ready, emit it */
+ g_signal_emit (list, signals[NEW_ROOM], 0, chatroom);
+ g_object_unref (chatroom);
+ } else {
+ /* We first need to inspect the handle */
+ if (!handles) {
+ handles = g_array_new (FALSE, FALSE, sizeof (guint));
+ }
+
+ g_array_append_val (handles, handle);
+ chatrooms = g_slist_prepend (chatrooms, chatroom);
+ }
+ }