]> git.0d.be Git - empathy.git/commitdiff
Merge branch 'butterfly-conference-misc'
authorJonny Lamb <jonnylamb@gnome.org>
Thu, 11 Mar 2010 11:35:45 +0000 (11:35 +0000)
committerJonny Lamb <jonnylamb@gnome.org>
Thu, 11 Mar 2010 11:35:45 +0000 (11:35 +0000)
libempathy/empathy-dispatcher.c
libempathy/empathy-tp-chat.c

index caf697cb68f419fec53e0f66db27e844630af5b1..1edefe9bf3338313b5121e9bd85ae1b422f65335 100644 (file)
@@ -1808,7 +1808,7 @@ channel_class_matches (GValueArray *class,
   h_type = tp_asv_get_uint32 (fprops,
                               TP_IFACE_CHANNEL ".TargetHandleType", &valid);
 
-  if (!valid || handle_type != h_type)
+  if (!valid || (handle_type != h_type && handle_type != TP_UNKNOWN_HANDLE_TYPE))
     return FALSE;
 
   if (fixed_properties != NULL)
@@ -1978,7 +1978,8 @@ setup_varargs (va_list var_args,
  * @dispatcher: an #EmpathyDispatcher
  * @connection: a #TpConnection
  * @channel_type: a string identifying the type of the channel to lookup
- * @handle_type: the handle type for the channel
+ * @handle_type: the handle type for the channel, or %TP_UNKNOWN_HANDLE_TYPE
+ *               if you don't care about the channel's target handle type
  * @first_property_name: %NULL, or the name of the first fixed property,
  * followed optionally by more names, followed by %NULL.
  *
index cba102add5e0423bc2273fd5d45585381c5489ad..7877acb22e1d7e09d895fb037ac08833194bd1a3 100644 (file)
@@ -885,6 +885,14 @@ tp_chat_update_remote_contact (EmpathyTpChat *chat)
                return;
        }
 
+       /* This is an MSN chat, but it's the new style where 1-1 chats don't
+        * have the group interface. If it has the conference interface, then
+        * it is indeed a MUC. */
+       if (tp_proxy_has_interface_by_id (priv->channel,
+                                         EMP_IFACE_QUARK_CHANNEL_INTERFACE_CONFERENCE)) {
+               return;
+       }
+
        /* This is an MSN-like chat where anyone can join the chat at anytime.
         * If there is only one non-self contact member, we are in a private
         * chat and we set the "remote-contact" property to that contact. If
@@ -1280,7 +1288,7 @@ tp_chat_constructor (GType                  type,
                list = empathy_dispatcher_find_requestable_channel_classes (
                        dispatcher, connection,
                        tp_channel_get_channel_type (priv->channel),
-                       TP_HANDLE_TYPE_ROOM, NULL);
+                       TP_UNKNOWN_HANDLE_TYPE, NULL);
 
                for (ptr = list; ptr; ptr = ptr->next) {
                        GValueArray *array = ptr->data;