XMPP service ... remove from tech preview, as several
[citadel.git] / citadel / modules / jabber / xmpp_presence.c
index 0bce01b133e2c294d8428e8f99b652792b811960..c4e86386b4c8bece74bf000e5a0022b708b2aad9 100644 (file)
@@ -92,7 +92,10 @@ void xmpp_presence_notify(char *presence_jid, char *presence_type) {
        lprintf(CTDL_DEBUG, "%d sessions for <%s> are now visible to session %d\n",
                visible_sessions, presence_jid, CC->cs_pid);
 
-       if ( (strcasecmp(presence_type, "unavailable")) && (visible_sessions == 1) ) {
+       if (
+          ( (strcasecmp(presence_type, "unavailable")) || (strcasecmp(presence_type, "unsubscribed")) )
+          && (visible_sessions == 1) ) {
+
                lprintf(CTDL_DEBUG, "Telling session %d that <%s> logged in\n", CC->cs_pid, presence_jid);
 
                /* Do an unsolicited roster update that adds a new contact. */