1. 06 Nov, 2013 2 commits
    • JC Brand's avatar
      'ask' attribute of 'subscribe' is only for 'pending out' requests. · 7a5bc7fe
      JC Brand authored
      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'.
      7a5bc7fe
    • JC Brand's avatar
      Roster item 'ask' property is always 'subscribe' for subscription requests · fb8e2cde
      JC Brand authored
      * 'pending' state is denoted by subscription='none', ask='subscribe'
      * 'requesting' state is denoted by subscription='from', ask='subscribe'
      
      Reference: http://xmpp.org/rfcs/rfc3921.html#int
      
      I'm not yet 100% sure with regards to the 'requesting' state, I can't find
      anything about it in the above mentioned reference, but apparantly that's what
      prosody's roster response looks like (e.g. <item jid='XYZ' ask='subscribe'
      subscription='from'/> ).
      
      With ejabberd I haven't yet received such a roster response and contact
      requests are always handled via presence stanzas.
      
      updates #81
      fb8e2cde
  2. 04 Nov, 2013 1 commit
  3. 03 Nov, 2013 5 commits
  4. 02 Nov, 2013 4 commits
  5. 27 Oct, 2013 2 commits
  6. 20 Oct, 2013 8 commits
  7. 19 Oct, 2013 7 commits
  8. 17 Oct, 2013 3 commits
  9. 16 Oct, 2013 8 commits