aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy
diff options
context:
space:
mode:
Diffstat (limited to 'libempathy')
-rw-r--r--libempathy/empathy-idle.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/libempathy/empathy-idle.c b/libempathy/empathy-idle.c
index c86b997af..b8c7784d7 100644
--- a/libempathy/empathy-idle.c
+++ b/libempathy/empathy-idle.c
@@ -570,17 +570,19 @@ empathy_idle_set_presence (EmpathyIdle *idle,
status = NULL;
}
- if (!empathy_connectivity_is_online (priv->connectivity)) {
+ if (state != TP_CONNECTION_PRESENCE_TYPE_OFFLINE &&
+ !empathy_connectivity_is_online (priv->connectivity)) {
DEBUG ("Empathy is not online");
+ priv->saved_state = state;
if (tp_strdiff (priv->status, status)) {
- g_free (priv->status);
- priv->status = NULL;
+ g_free (priv->saved_status);
+ priv->saved_status = NULL;
if (!EMP_STR_EMPTY (status)) {
- priv->status = g_strdup (status);
+ priv->saved_status = g_strdup (status);
}
- g_object_notify (G_OBJECT (idle), "status");
}
+ return;
}
empathy_idle_do_set_presence (idle, state, status);