I committed your diff for presenced with a following clean up. But maybe, I will change the presenced semantic a bit.
But for the moment I fixes the daemon in a very good way. Thanks for your help! bye, Jan On Tue, Dec 08, 2015 at 01:57:26PM -0500, Greg Reagle wrote: > 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, > MXML_DESCEND_FIRST); > 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 2.2.2.2. Status > [2] http://xmpp.org/rfcs/rfc3921.html 2.2.1. Types of Presence