Stream Feature: Implement Roster 'push' #25

Open
opened 2024-12-25 12:30:45 +00:00 by Ivan-lis · 0 comments
Member

https://xmpp.org/rfcs/rfc6121.html#rfc.section.2.1.6

A "roster push" is a newly created, updated, or deleted roster item that is sent from the server to the client; syntactically it is an IQ stanza of type "set" sent from server to client and containing a element qualified by the 'jabber:iq:roster' namespace.

The following rules apply to roster pushes:

The element in a roster push MUST contain one and only one element.
A receiving client MUST ignore the stanza unless it has no 'from' attribute (i.e., implicitly from the bare JID of the user's account) or it has a 'from' attribute whose value matches the user's bare JID user@domainpart.

S: <iq id='a78b4q6ha463'
       to='juliet@example.com/chamber'
       type='set'>
    <query xmlns='jabber:iq:roster'>
      <item jid='nurse@example.com'/>
    </query>
  </iq>

As mandated by the semantics of the IQ stanza as defined in [XMPP‑CORE], each resource that receives a roster push from the server is supposed to reply with an IQ stanza of type "result" or "error" (however, it is known that many existing clients do not reply to roster pushes).

C: <iq from='juliet@example.com/balcony'
       id='a78b4q6ha463'
       type='result'/>

C: <iq from='juliet@example.com/chamber'
       id='a78b4q6ha463'
       type='result'/>
https://xmpp.org/rfcs/rfc6121.html#rfc.section.2.1.6 A "roster push" is a newly created, updated, or deleted roster item that is sent from the server to the client; syntactically it is an IQ stanza of type "set" sent from server to client and containing a <query/> element qualified by the 'jabber:iq:roster' namespace. The following rules apply to roster pushes: The <query/> element in a roster push MUST contain one and only one <item/> element. A receiving client MUST ignore the stanza unless it has no 'from' attribute (i.e., implicitly from the bare JID of the user's account) or it has a 'from' attribute whose value matches the user's bare JID <user@domainpart>. ```xml S: <iq id='a78b4q6ha463' to='juliet@example.com/chamber' type='set'> <query xmlns='jabber:iq:roster'> <item jid='nurse@example.com'/> </query> </iq> ``` As mandated by the semantics of the IQ stanza as defined in [XMPP‑CORE], each resource that receives a roster push from the server is supposed to reply with an IQ stanza of type "result" or "error" (however, it is known that many existing clients do not reply to roster pushes). ```xml C: <iq from='juliet@example.com/balcony' id='a78b4q6ha463' type='result'/> C: <iq from='juliet@example.com/chamber' id='a78b4q6ha463' type='result'/> ```
Ivan-lis added this to the Main project 2024-12-25 12:57:18 +00:00
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Larra/larra#25
No description provided.