Open Ri0n opened 9 years ago
Comment #1 originally posted by psi-plus on 2014-10-19T14:50:22.000Z:
As we can see here http://xmpp.org/rfcs/rfc6121.html#session server sends contact's presences after initial presence. So Psi behaves right and the bug in FaceBook's server.
Comment #2 originally posted by psi-plus on 2014-10-19T15:14:59.000Z:
Yes, but that is just a one particular sample. The actual specs for processing presence are in section 4 here: http://xmpp.org/rfcs/rfc6121.html#presence
The conclusion I made in the report above is from that section, which indeed does not state, that the server has to return the presence of all user's contacts, but statec only that it has to broadcast the presence of the user to all it's contacts.
Receiving the contacts presence can thus happen any time at all (though of course the rational setting is to respond with contacts presence after initial presence is sent by the client).
I may be missing something, bud the specs on this seem to me quite vague and benevolent (and that is the reason I report this issue here and not to Facebook devels).
Comment #3 originally posted by psi-plus on 2014-10-19T15:16:45.000Z:
Yes, but that is just a one particular sample. The actual specs for processing presence are in section 4 here: http://xmpp.org/rfcs/rfc6121.html#presence
The conclusion I made in the report above is from that section, which indeed does not state, that the server has to return the presence of all user's contacts, but states only that it has to broadcast the presence of the user to all his/hers contacts.
Receiving the contacts presence can thus happen any time at all (though of course the rational setting is to respond with contacts presence after initial presence is sent by the client).
I may be missing something, bud the specs on this seem to me quite vague and benevolent (and that is the reason I report this issue here and not to Facebook devels).
@Ri0n, @Vitozz: Not linked with this ticket?
Original issue 596 created by psi-plus on 2014-10-19T08:03:22.000Z:
Шаги по воспроизведению проблемы: What steps will reproduce the problem?
Каков ожидаемый результат? What is the expected output?
Online contacts appear in the roster.
Что Вы видите вместо этого? What do you see instead?
Online contacts do appear in the roster, but only for a short while before the connecting process finishes (approx. 1-2s). After that they are switched to offline. All contacts remain offline till further status change (even though they are really shown online on the Facebook web chat or in other XMPP clients connected to Facebook chat).
Какую версию Psi+ / ОС Вы используете? What version of the Psi+/OS are you using?
Psi+ v0.16.406-435 (20141016), package from Launchpad repository used on Debian GNU/Linux (stable/testing/unstable mix).
Дополнительная информация по проблеме: Additional information:
After analysing the XML exchange, it seems that regular/full XMPP server usually sends user's contacts presence AFTER the initial presence stanza is received from the user's client. Some servers (especially Facebook XMPP implementation) do not wait for the initial presence stanza to be sent and send the contacts presence BEFORE, and ONLY ONCE – so after the initial presence is received from the client the server does not respond with sending available contacts presence stanzas.
Psi+ (as far as my experience and external analysis goes) probably EXPECTS the server to send presence stanzas after it sends user's initial presence to the server and sets contacts status accordingly. If the server does not at this moment send any presence stanzas, all contacts are treated as "unavailable". (This explains the short moment of online contacts being shown and then switched to offline.)
From my understanding of the XMPP RFC specification the server is not obliged to send the contact presence stanzas as a response to receiving initial presence from the client. So the PRESUPPOSITION that it is always or must be so is false and results in both potential and actual bug in Psi.