aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy/empathy-idle.c
diff options
context:
space:
mode:
Diffstat (limited to 'libempathy/empathy-idle.c')
-rw-r--r--libempathy/empathy-idle.c24
1 files changed, 20 insertions, 4 deletions
diff --git a/libempathy/empathy-idle.c b/libempathy/empathy-idle.c
index e1cccf1e7..9250359f0 100644
--- a/libempathy/empathy-idle.c
+++ b/libempathy/empathy-idle.c
@@ -577,15 +577,31 @@ empathy_idle_set_flash_state (EmpathyIdle *idle,
static void
empathy_idle_do_set_presence (EmpathyIdle *idle,
- TpConnectionPresenceType state,
- const gchar *status)
+ TpConnectionPresenceType status_type,
+ const gchar *status_message)
{
EmpathyIdlePriv *priv = GET_PRIV (idle);
+ const gchar *statusses[NUM_TP_CONNECTION_PRESENCE_TYPES] = {
+ NULL,
+ "offline",
+ "available",
+ "away",
+ "xa",
+ "hidden",
+ "busy",
+ NULL,
+ NULL,
+ };
+ const gchar *status;
+
+ g_assert (status_type > 0 && status_type < NUM_TP_CONNECTION_PRESENCE_TYPES);
+
+ status = statusses[status_type];
+ g_return_if_fail (status != NULL);
- /* FIXME */
empathy_account_manager_request_global_presence (priv->manager,
- state, "available", status);
+ status_type, status, status_message);
}
void