]> git.0d.be Git - empathy.git/commitdiff
chat-manager: stop telling the chat mgr about handled rooms
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Thu, 2 Dec 2010 14:12:41 +0000 (15:12 +0100)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Thu, 2 Dec 2010 14:12:43 +0000 (15:12 +0100)
Now that the chat handler has moved to its own process this is no longer
enough. The instance of the chat manager in empathy doesn't know about the
handlded channels.

The chat manager should implement an Observer instead to know about all the
rooms.

src/empathy-chat-manager.c

index 946aecb9722310d05b05b22f336ffe8b6b2278e0..38c91fa4d1508337a9a5583796b141768e06f5a1 100644 (file)
@@ -99,22 +99,6 @@ chat_data_free (ChatData *data)
   g_slice_free (ChatData, data);
 }
 
-static void
-tell_chatroom_manager_if_needed (EmpathyChatManager *self,
-    TpAccount *account,
-    EmpathyTpChat *chat)
-{
-  EmpathyChatManagerPriv *priv = GET_PRIV (self);
-  TpHandleType type;
-
-  tp_channel_get_handle (empathy_tp_chat_get_channel (chat), &type);
-
-  if (type == TP_HANDLE_TYPE_ROOM)
-    {
-      empathy_chatroom_manager_chat_handled (priv->chatroom_mgr, chat, account);
-    }
-}
-
 static void
 process_tp_chat (EmpathyChatManager *self,
     EmpathyTpChat *tp_chat,
@@ -124,8 +108,6 @@ process_tp_chat (EmpathyChatManager *self,
   EmpathyChat *chat = NULL;
   const gchar *id;
 
-  tell_chatroom_manager_if_needed (self, account, tp_chat);
-
   id = empathy_tp_chat_get_id (tp_chat);
   if (!tp_str_empty (id))
     {