xmpp.chapril.org-conversejs/spec
JC Brand 7a5bc7fe65 'ask' attribute of 'subscribe' is only for 'pending out' requests.
Did more investigation with regards to subscription requests.

As far as I can tell, roster updates will only show ask='request' for 'pending
out' requests.

For 'pending in' requests (what converse.js calls requesting contacts), roster
updates are not used and instead a presence stanza with type 'subscribe' is
used.

This makes sense. When sending a presence with type 'subscribe', we need a way
to keep track of our outgoing subscriptions. The XMPP server helps us do this by
adding a user to our roster with ask='request' and subscription='none'.

When our contact receives our presence with type 'subscribe', they have the
information they need. If they go offline and online again, the XMPP server
will resend the presence with type 'subscribe'. So a roster item is not needed.

In convere.js's internal representation of the roster (via the RosterItems backbone
object) we need to add roster items for 'pending in' contacts so that we can
render them and we need to know whether they are 'pending in' or 'pending out'.

We already know they're 'pending out' when ask='subscribe' and
subscription='none'. For 'pending in', since these roster items are only stored
locally and not on the XMPP server (because 'pending in' requests are handled
via <presence> stanzas and not the roster) we add a special attribute
'requesting'.
2013-11-06 09:54:58 +02:00
..
ChatBoxSpec.js Add tests for the chat toolbar. 2013-11-03 22:28:44 +02:00
ChatRoomSpec.js Refactor ChatRoom tests (move code to utils.js) 2013-11-03 12:02:25 +02:00
ControlBoxSpec.js 'ask' attribute of 'subscribe' is only for 'pending out' requests. 2013-11-06 09:54:58 +02:00