diff options
author | Will Thompson <will.thompson@collabora.co.uk> | 2009-08-13 19:10:01 +0800 |
---|---|---|
committer | Will Thompson <will.thompson@collabora.co.uk> | 2009-08-14 19:52:42 +0800 |
commit | b15c53e7e8b21fcfb4e6c43e0740866a6c2a5130 (patch) | |
tree | b661e2b6ea7da621312ff4d17d1ec0a37b294aa4 | |
parent | e3636c7d43ab2a0ab059def183d10a2fb7867418 (diff) | |
download | gsoc2013-empathy-b15c53e7e8b21fcfb4e6c43e0740866a6c2a5130.tar gsoc2013-empathy-b15c53e7e8b21fcfb4e6c43e0740866a6c2a5130.tar.gz gsoc2013-empathy-b15c53e7e8b21fcfb4e6c43e0740866a6c2a5130.tar.bz2 gsoc2013-empathy-b15c53e7e8b21fcfb4e6c43e0740866a6c2a5130.tar.lz gsoc2013-empathy-b15c53e7e8b21fcfb4e6c43e0740866a6c2a5130.tar.xz gsoc2013-empathy-b15c53e7e8b21fcfb4e6c43e0740866a6c2a5130.tar.zst gsoc2013-empathy-b15c53e7e8b21fcfb4e6c43e0740866a6c2a5130.zip |
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.
-rw-r--r-- | 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 a3282818f..9300364d5 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)); + } } |