[empathy] Only call SetChatState if the Channel supports it
- From: Will Thompson <wjt src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [empathy] Only call SetChatState if the Channel supports it
- Date: Fri, 14 Aug 2009 11:52:57 +0000 (UTC)
commit b15c53e7e8b21fcfb4e6c43e0740866a6c2a5130
Author: Will Thompson <will thompson collabora co uk>
Date: Thu Aug 13 12:10:01 2009 +0100
Only call SetChatState if the Channel supports it
I'm sick of seeing spurious debug messages about this whenever I type
anything into an IRC channel.
libempathy/empathy-tp-chat.c | 17 ++++++++++-------
1 files changed, 10 insertions(+), 7 deletions(-)
---
diff --git a/libempathy/empathy-tp-chat.c b/libempathy/empathy-tp-chat.c
index a328281..9300364 100644
--- a/libempathy/empathy-tp-chat.c
+++ b/libempathy/empathy-tp-chat.c
@@ -1328,13 +1328,16 @@ empathy_tp_chat_set_state (EmpathyTpChat *chat,
g_return_if_fail (EMPATHY_IS_TP_CHAT (chat));
g_return_if_fail (priv->ready);
- DEBUG ("Set state: %d", state);
- tp_cli_channel_interface_chat_state_call_set_chat_state (priv->channel, -1,
- state,
- tp_chat_async_cb,
- "setting chat state",
- NULL,
- G_OBJECT (chat));
+ if (tp_proxy_has_interface_by_id (priv->channel,
+ TP_IFACE_QUARK_CHANNEL_INTERFACE_CHAT_STATE)) {
+ DEBUG ("Set state: %d", state);
+ tp_cli_channel_interface_chat_state_call_set_chat_state (priv->channel, -1,
+ state,
+ tp_chat_async_cb,
+ "setting chat state",
+ NULL,
+ G_OBJECT (chat));
+ }
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]