aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libempathy/empathy-tp-chat.c17
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));
+ }
}