diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/empathy-event-manager.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/empathy-event-manager.c b/src/empathy-event-manager.c index a0171858a..ea9ebc697 100644 --- a/src/empathy-event-manager.c +++ b/src/empathy-event-manager.c @@ -1123,10 +1123,10 @@ event_manager_publish_state_changed_cb (TpContact *contact, } static void -event_manager_presence_changed_cb (EmpathyContact *contact, +check_presence (EmpathyEventManager *manager, + EmpathyContact *contact, TpConnectionPresenceType current, - TpConnectionPresenceType previous, - EmpathyEventManager *manager) + TpConnectionPresenceType previous) { EmpathyEventManagerPriv *priv = GET_PRIV (manager); TpAccount *account; @@ -1186,6 +1186,15 @@ out: g_object_unref (presence_mgr); } +static void +event_manager_presence_changed_cb (EmpathyContact *contact, + TpConnectionPresenceType current, + TpConnectionPresenceType previous, + EmpathyEventManager *manager) +{ + check_presence (manager, contact, current, previous); +} + static GObject * event_manager_constructor (GType type, guint n_props, @@ -1288,6 +1297,10 @@ contact_list_changed_cb (EmpathyConnectionAggregator *aggregator, tp_g_signal_connect_object (contact, "presence-changed", G_CALLBACK (event_manager_presence_changed_cb), self, 0); + check_presence (self, contact, + empathy_contact_get_presence (contact), + TP_CONNECTION_PRESENCE_TYPE_OFFLINE); + tp_g_signal_connect_object (tp_contact, "notify::publish-state", G_CALLBACK (event_manager_publish_state_changed_cb), self, 0); |