aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy/empathy-chatroom-manager.c
diff options
context:
space:
mode:
Diffstat (limited to 'libempathy/empathy-chatroom-manager.c')
-rw-r--r--libempathy/empathy-chatroom-manager.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/libempathy/empathy-chatroom-manager.c b/libempathy/empathy-chatroom-manager.c
index 940b56220..7c3559e2f 100644
--- a/libempathy/empathy-chatroom-manager.c
+++ b/libempathy/empathy-chatroom-manager.c
@@ -30,6 +30,8 @@
#include <libxml/parser.h>
#include <libxml/tree.h>
+#include <telepathy-glib/interfaces.h>
+
#include "empathy-tp-chat.h"
#include "empathy-chatroom-manager.h"
#include "empathy-account-manager.h"
@@ -221,7 +223,8 @@ chatroom_manager_parse_chatroom (EmpathyChatroomManager *manager,
xmlFree (str);
}
- account = empathy_account_manager_lookup (priv->account_manager, account_id);
+ account = empathy_account_manager_get_account (priv->account_manager,
+ account_id);
if (!account) {
g_free (name);
g_free (room);
@@ -234,7 +237,6 @@ chatroom_manager_parse_chatroom (EmpathyChatroomManager *manager,
add_chatroom (manager, chatroom);
g_signal_emit (manager, signals[CHATROOM_ADDED], 0, chatroom);
- g_object_unref (account);
g_free (name);
g_free (room);
g_free (account_id);
@@ -578,9 +580,8 @@ empathy_chatroom_manager_find (EmpathyChatroomManager *manager,
this_account = empathy_chatroom_get_account (chatroom);
this_room = empathy_chatroom_get_room (chatroom);
- if (this_account && this_room &&
- empathy_account_equal (account, this_account) &&
- strcmp (this_room, room) == 0) {
+ if (this_account && this_room && account == this_account
+ && strcmp (this_room, room) == 0) {
return chatroom;
}
}
@@ -609,8 +610,7 @@ empathy_chatroom_manager_get_chatrooms (EmpathyChatroomManager *manager,
chatroom = l->data;
- if (empathy_account_equal (account,
- empathy_chatroom_get_account (chatroom))) {
+ if (account == empathy_chatroom_get_account (chatroom)) {
chatrooms = g_list_append (chatrooms, chatroom);
}
}
@@ -639,8 +639,7 @@ empathy_chatroom_manager_get_count (EmpathyChatroomManager *manager,
chatroom = l->data;
- if (empathy_account_equal (account,
- empathy_chatroom_get_account (chatroom))) {
+ if (account == empathy_chatroom_get_account (chatroom)) {
count++;
}
}
@@ -705,8 +704,8 @@ chatroom_manager_observe_channel_cb (EmpathyDispatcher *dispatcher,
chat = EMPATHY_TP_CHAT (
empathy_dispatch_operation_get_channel_wrapper (operation));
connection = empathy_tp_chat_get_connection (chat);
- account = empathy_account_manager_get_account (priv->account_manager,
- connection);
+ account = empathy_account_manager_get_account_for_connection (
+ priv->account_manager, connection);
roomname = empathy_tp_chat_get_id (chat);