[dev] sj: bug in receiving presence

From: Greg Reagle <greg.reagle_AT_umbc.edu>
Date: Tue, 8 Dec 2015 13:57:26 -0500

In this message, I point out the error and state the correct way of
receiving presence. FRIGN, please don't call me a help vampire. :> I
do plan to write the patch, but it might take me a little while.

Re: https://github.com/younix/sj

in presenced.c in recv_presence(), lines 254-255
     status = mxmlFindElement(node, tree, "status", NULL, NULL,
but this always return NULL when I use sj, even for buddies who are
online. This is because their presence message does not have a status
element. None of the presence messages that I see via sj, either online
or offline, have a status element. The standard states that a status
element is optional [1]. The standard states that the way to indicate
that a buddy is online is the absence of a 'type' attribute. [2].

[1] http://xmpp.org/rfcs/rfc3921.html Status
[2] http://xmpp.org/rfcs/rfc3921.html 2.2.1. Types of Presence
Received on Tue Dec 08 2015 - 19:57:26 CET

This archive was generated by hypermail 2.3.0 : Tue Dec 08 2015 - 20:00:13 CET