summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.co.uk>2012-07-24 13:45:25 +0200
committerXavier Claessens <xavier.claessens@collabora.co.uk>2012-07-24 13:45:25 +0200
commit523691b44584947b25ce1e93a0191e60c60ca78f (patch)
treeb1e16e7d82bf96ca25b245d1ccd82acda10509e6
parent505403d253c7071ab081cc258827b605a6ed93b0 (diff)
TpAccountManager: set the requested presence on newly created accounts
-rw-r--r--telepathy-glib/account-manager.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/telepathy-glib/account-manager.c b/telepathy-glib/account-manager.c
index 0e78bbc2b..6d31a01da 100644
--- a/telepathy-glib/account-manager.c
+++ b/telepathy-glib/account-manager.c
@@ -989,6 +989,16 @@ insert_account (TpAccountManager *self,
g_strdup (tp_proxy_get_object_path (account)),
g_object_ref (account));
+ /* If a global presence has been requested, set in on new accounts as well */
+ if (self->priv->requested_presence != TP_CONNECTION_PRESENCE_TYPE_UNSET)
+ {
+ tp_account_request_presence_async (account,
+ self->priv->requested_presence,
+ self->priv->requested_status,
+ self->priv->requested_status_message,
+ NULL, NULL);
+ }
+
tp_g_signal_connect_object (account, "notify::enabled",
G_CALLBACK (_tp_account_manager_account_enabled_cb),
G_OBJECT (self), 0);