aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-04-15 18:21:52 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-04-18 19:09:48 +0800
commitddcc4fc3969c7eb60af1a298a8619d1bb0359a83 (patch)
tree8569646dd304e2ad081fd168e660e2088319aef3 /libempathy
parent5d64d93d3b713a474b56610f38c4fcbb9612c02e (diff)
downloadgsoc2013-empathy-ddcc4fc3969c7eb60af1a298a8619d1bb0359a83.tar
gsoc2013-empathy-ddcc4fc3969c7eb60af1a298a8619d1bb0359a83.tar.gz
gsoc2013-empathy-ddcc4fc3969c7eb60af1a298a8619d1bb0359a83.tar.bz2
gsoc2013-empathy-ddcc4fc3969c7eb60af1a298a8619d1bb0359a83.tar.lz
gsoc2013-empathy-ddcc4fc3969c7eb60af1a298a8619d1bb0359a83.tar.xz
gsoc2013-empathy-ddcc4fc3969c7eb60af1a298a8619d1bb0359a83.tar.zst
gsoc2013-empathy-ddcc4fc3969c7eb60af1a298a8619d1bb0359a83.zip
empathy-tp-chat: ensure that we get a TpTextChannel
Diffstat (limited to 'libempathy')
-rw-r--r--libempathy/empathy-chatroom-manager.c3
-rw-r--r--libempathy/empathy-tp-chat.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/libempathy/empathy-chatroom-manager.c b/libempathy/empathy-chatroom-manager.c
index dd7ef460e..9ad75ee03 100644
--- a/libempathy/empathy-chatroom-manager.c
+++ b/libempathy/empathy-chatroom-manager.c
@@ -873,6 +873,9 @@ observe_channels_cb (TpSimpleObserver *observer,
if (tp_proxy_get_invalidated (channel) != NULL)
continue;
+ if (!TP_IS_TEXT_CHANNEL (channel))
+ continue;
+
tp_chat = empathy_tp_chat_new (account, channel);
roomname = empathy_tp_chat_get_id (tp_chat);
chatroom = empathy_chatroom_manager_find (self, account, roomname);
diff --git a/libempathy/empathy-tp-chat.c b/libempathy/empathy-tp-chat.c
index 1b2fe46b7..8c09529b7 100644
--- a/libempathy/empathy-tp-chat.c
+++ b/libempathy/empathy-tp-chat.c
@@ -1551,7 +1551,7 @@ empathy_tp_chat_new (TpAccount *account,
TpChannel *channel)
{
g_return_val_if_fail (TP_IS_ACCOUNT (account), NULL);
- g_return_val_if_fail (TP_IS_CHANNEL (channel), NULL);
+ g_return_val_if_fail (TP_IS_TEXT_CHANNEL (channel), NULL);
return g_object_new (EMPATHY_TYPE_TP_CHAT,
"account", account,