[Telepathy-commits] [telepathy-gabble/master] If handles are not in the presence cache set them as unknown or offline depending on whether we have a roster subscription

Sjoerd Simons sjoerd at luon.net
Tue Aug 19 10:54:11 PDT 2008


20080721131542-93b9a-b42b572a45401dfdfe54bb31e95e23d38bb2b338.gz
---
 src/conn-presence.c |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/src/conn-presence.c b/src/conn-presence.c
index dbd5015..9ce8e76 100644
--- a/src/conn-presence.c
+++ b/src/conn-presence.c
@@ -27,6 +27,10 @@
 #include <telepathy-glib/svc-connection.h>
 #include <telepathy-glib/util.h>
 
+#include "connection.h"
+#include "presence.h"
+#include "presence-cache.h"
+
 #define DEBUG_FLAG GABBLE_DEBUG_CONNECTION
 
 #include "connection.h"
@@ -106,8 +110,13 @@ construct_contact_statuses_cb (GObject *obj,
         }
       else
         {
-          status = GABBLE_PRESENCE_OFFLINE;
-          status_message = NULL;
+         if (gabble_roster_handle_get_subscription(self->roster, handle)
+           & GABBLE_ROSTER_SUBSCRIPTION_FROM)
+           status = GABBLE_PRESENCE_OFFLINE;
+         else
+           status = GABBLE_PRESENCE_UNKNOWN;
+
+         status_message = NULL;
         }
 
       parameters = g_hash_table_new_full (g_str_hash, g_str_equal, NULL,
-- 
1.5.6.3




More information about the Telepathy-commits mailing list