stanza
Click on the red underlined text to get to the source
... Syntax of XML Stanzas ...
... before addressing particular "use cases" for such applications, we
here further describe the syntax of XML stanzas, thereby
supplementing the discussion in [XMPP-CORE ...
...
The 'type' attribute of a message stanza is RECOMMENDED; if included,
it specifies the conversational context of the message, thus
...
... o error -- An error has occurred related to a previous message sent
by the sender (for details regarding stanza error syntax, refer to
[XMPP-CORE]). A compliant client ...
... As described under extended namespaces (Section 2.4), a message
stanza MAY contain any properly-namespaced child element.
...
... In accordance with the default namespace declaration, by default a
message stanza is qualified by the 'jabber:client' or 'jabber ...
... namespace, which defines certain allowable children of message
stanzas. If the message stanza is of type "error", it MUST include
an <error/> child; for details, see [XMPP-CORE ...
... namespace, which defines certain allowable children of message
stanzas. If the message stanza is of type "error", it MUST include
an <error/> child; for details, see [XMPP-CORE]. Otherwise, the
...
... an <error/> child; for details, see [XMPP-CORE]. Otherwise, the
message stanza MAY contain any of the following child elements
without an explicit namespace ...
... <thread/> element is OPTIONAL and is not used to identify individual
messages, only conversations. A message stanza MUST NOT contain more
than one <thread/> element. The <thread/> element ...
... availability (offline or online, along with various sub-states of the
latter and optional user-defined descriptive text), and to notify
other entities of that availability. Presence stanzas are also used
to negotiate and manage subscriptions to the presence of other
entities.
...
...
The 'type' attribute of a presence stanza is OPTIONAL. A presence
stanza that does not possess a 'type' attribute is used to signal to
the server that the sender ...
...
The 'type' attribute of a presence stanza is OPTIONAL. A presence
stanza that does not possess a 'type' attribute is used to signal to
the server that the sender is online and available for communication.
...
... request for another entity's current presence, or an error related to
a previously-sent presence stanza. If included, the 'type' attribute
MUST have one of the following values:
...
... o error -- An error has occurred regarding processing or delivery of
a previously-sent presence stanza.
For detailed information regarding presence semantics ...
...
As described under extended namespaces (Section 2.4), a presence
stanza MAY contain any properly-namespaced child element.
...
... In accordance with the default namespace declaration, by default a
presence stanza is qualified by the 'jabber:client' or
...
... jabber:server' namespace, which defines certain allowable children
of presence stanzas. If the presence stanza is of type "error", it
MUST include an <error/> child; for details, see [XMPP-CORE ...
... namespace, which defines certain allowable children
of presence stanzas. If the presence stanza is of type "error", it
MUST include an <error/> child; for details, see [XMPP-CORE]. If the
...
... MUST include an <error/> child; for details, see [XMPP-CORE]. If the
presence stanza possesses no 'type' attribute, it MAY contain any of
the following child elements ...
... the following child elements (note that the <status/> child MAY be
sent in a presence stanza of type "unavailable" or, for historical
reasons, "subscribe ...
... XML
character data that specifies the particular availability status of
an entity or specific resource. A presence stanza MUST NOT contain
more than one <show/> element. The <show/> element ...
... one of the following (additional availability types could be defined
through a properly-namespaced child element of the presence stanza):
o away -- The entity ...
... priority level of the resource. The
value MUST be an integer between -128 and +127. A presence stanza
MUST NOT contain more than one <priority/> element ...
... instant messaging and presence applications, refer to Server Rules
for Handling XML Stanzas (Section 11).
...
... and 'jabber:server' namespaces do not define any children of IQ
stanzas other than the common <error/>). This memo defines two such
extended namespaces, one for Roster Management ...
... Roster Management (Section 7) and the
other for Blocking Communication (Section 10); however, an IQ stanza
MAY contain structured information qualified by any extended
namespace ...
... presence, XMPP uses XML namespaces to extend the stanzas for the
purpose of providing additional functionality. Thus a message or
presence stanza ...
... stanzas for the
purpose of providing additional functionality. Thus a message or
presence stanza MAY contain one or more optional child elements
specifying content that extends the meaning of the message (e.g., an
...
... XHTML-formatted version of the message body), and an IQ stanza MAY
contain one such child element. This child element ...
... recipient:
Recipient: If a recipient receives a stanza that contains a child
element it does not understand, it SHOULD ignore that specific XML
data ...
...
* If an entity receives a message or presence stanza that
contains XML data qualified by a namespace ...
... XML data qualified by a namespace it does not
understand, the portion of the stanza that is in the unknown
namespace SHOULD be ignored.
...
...
* If an entity receives a message stanza whose only child element
is qualified by a namespace ...
... is qualified by a namespace it does not understand, it MUST
ignore the entire stanza.
* If an entity ...
...
* If an entity receives an IQ stanza of type "get" or "set"
containing a child element qualified by a namespace ...
... namespace it does not
understand, the entity SHOULD return an IQ stanza of type
"error" with an error condition of <service ...
... Router: If a routing entity (usually a server) handles a stanza that
contains a child element it does not understand, it SHOULD ignore
...
... XMPP-CORE] before attempting to
establish a session or send any XML stanzas.
2. Resource Binding -- after completing stream ...
... instant messaging and presence
functionality; it completes this step by sending to the server an IQ
stanza of type "set" containing an empty <session/> child element
...
... TCP connection for the active resource, and return a IQ stanza of
type "result" (indicating success) to the newly-requested session. In
...
... type "result" (indicating success) to the newly-requested session. In
case #2, the server SHOULD send a <conflict/> stanza error to the
newly-requested session but maintain the XML stream ...
... Exchanging messages is a basic use of XMPP and is brought about when
a user generates a message stanza that is addressed to another
entity. As defined under Server Rules for Handling XML Stanzas ...
... stanza that is addressed to another
entity. As defined under Server Rules for Handling XML Stanzas
(Section 11), the sender's server is responsible for delivering the
...
... recipient is on a different server).
For information regarding the syntax of message stanzas as well as
their defined attributes and child elements, refer to Message Syntax
...
... entity other than the sender in
the 'to' attribute of the <message/> stanza. If the message is being
sent in reply to a message previously received from an address of the
...
...
As noted, it is RECOMMENDED for a message stanza to possess a 'type'
attribute whose value captures the conversational context ...
...
A message stanza MAY (and often will) contain a child <body/> element
whose XML character data ...
...
A message stanza MAY contain a child <thread/> element specifying the
conversation thread in which the message is situated, for the purpose
...
... Exchanging presence information is made relatively straightforward
within XMPP by using presence stanzas. However, we see here a
contrast to the handling of messages: although a client MAY send
...
... address, normally presence notifications (i.e., presence stanzas with
no 'type' or of type "unavailable" and with no 'to' address ...
... subscribers). This broadcast model does not apply to
subscription-related presence stanzas or presence stanzas of type
"error", but to presence notifications ...
... broadcast model does not apply to
subscription-related presence stanzas or presence stanzas of type
"error", but to presence notifications only as defined above. (Note:
...
... client.)
For information regarding the syntax of presence stanzas as well as
their defined attributes and child elements, refer to [XMPP-CORE ...
... client SHOULD send initial presence
to the server in order to signal its availability for communications.
As defined herein, the initial presence stanza (1) MUST possess no
'to' address (signalling that it is meant to be broadcasted ...
...
1. Send presence probes (i.e., presence stanzas whose 'type'
attribute is set to a value of "probe") from the full JID ...
... Upon receiving initial presence from the user, the contact's server
MUST deliver the user's presence stanza to the full JIDs
(<contact@example.org/resource>) associated with all of the contact's
...
... (Section 10.10)).
If the user's server receives a presence stanza of type "error" in
response to the initial presence that it sent to a contact on behalf
of the user, it SHOULD NOT send further presence updates to that
...
... response to the initial presence that it sent to a contact on behalf
of the user, it SHOULD NOT send further presence updates to that
contact (until and unless it receives a presence stanza from the
contact).
...
... broadcasting at any time during its session by
sending a presence stanza with no 'to' address and either no 'type'
attribute or a 'type' attribute with a value of "unavailable ...
... availability.)
If the presence stanza lacks a 'type' attribute (i.e., expresses
availability), the user's server MUST broadcast the full XML ...
... broadcast the full XML of that
presence stanza to all contacts (1) that are in the user's roster
with a subscription type of "from" or "both", (2) to whom the user
...
... session (as well as to any of the user's other available resources).
If the presence stanza has a 'type' attribute set to a value of
"unavailable", the user's server MUST broadcast ...
... broadcast the full XML of that
presence stanza to all entities that fit the above description, as
well as to any entities to which the user has sent directed available
presence during the user's session ...
... state of "From", "From + Pending Out", or "Both" (as defined
under Subscription States (Section 9)), the contact's server MUST
return a presence stanza of type "error" in response to the
presence probe (however, if a server receives a presence probe ...
... state of "None", "None + Pending Out", or "To" (or is not in
the contact's roster at all), the contact's server MUST return
a <forbidden/> stanza error in response to the presence probe.
...
... state of "None + Pending In", "None + Pending Out/In", or "To
+ Pending In", the contact's server MUST return a
<not-authorized/> stanza error in response to the presence
probe.
...
... presence probe by sending to the user the
full XML of the last presence stanza of type "unavailable"
received by the server ...
... presence probe by sending to the user
the full XML of the last presence stanza with no 'to' attribute
received by the server from each of the contact's available
...
... A user MAY send directed presence to another entity (i.e., a presence
stanza with a 'to' attribute whose value is the JID of the other
entity ...
... route or deliver the
full XML of that presence stanza to the entity but MUST NOT
modify the contact's status regarding available presence
broadcast ...
... client SHOULD gracefully
become unavailable by sending a final presence stanza that possesses
no 'to' attribute and that possesses a 'type' attribute whose value
is "unavailable ...
... no 'to' attribute and that possesses a 'type' attribute whose value
is "unavailable" (optionally, the final presence stanza MAY contain
one or more <status/> elements specifying the reason why the user is
...
... session; the user's server MUST also send that unavailable presence
stanza to any of the user's other available resources, as well as to
any entities to which the user has sent directed presence during the
...
... directed unavailable presence to that entity). Any presence stanza
with no 'type' attribute and no 'to' attribute that is sent after
sending directed unavailable presence ...
...
A subscription request is a presence stanza whose 'type' attribute
has a value of "subscribe". If the subscription request ...
... broadcast that subscription
request to all available resources in accordance with Server Rules
for Handling XML Stanzas (Section 11). (Note: If an active resource
...
... be available and therefore MUST NOT send subscription requests to
it.) However, if the user receives a presence stanza of type
"subscribe" from a contact to whom the user has already granted
...
... error type='cancel'>
<gone xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
</error>
</presence>
...
... previously-granted subscription. Subscriptions are managed within
XMPP by sending presence stanzas containing specially-defined
attributes.
...
... subscribe to another entity's presence is made by
sending a presence stanza of type "subscribe".
...
... subscription request from another entity, it
MUST either approve the request by sending a presence stanza of type
"subscribed" or refuse the request by sending a presence stanza of
...
... MUST either approve the request by sending a presence stanza of type
"subscribed" or refuse the request by sending a presence stanza of
type "unsubscribed".
...
...
If a user would like to cancel a previously-granted subscription
request, it sends a presence stanza of type "unsubscribed".
...
... unsubscribe from the presence of another
entity, it sends a presence stanza of type "unsubscribe".
...
... IQ of type "set" containing a roster item) to ensure that it is from
a trusted source; specifically, the stanza MUST either have no 'from'
attribute (i.e., implicitly from the server) or have a 'from'
attribute whose value matches the user's bare JID ...
... and also push the change out to all of the user's available resources
that have requested the roster. This "roster push" consists of an IQ
stanza of type "set" from the server to the client and enables all
available resources to remain in sync with the server-based ...
...
As required by the semantics of the IQ stanza kind as defined in
[XMPP-CORE], each resource that received the roster push MUST reply
...
... [XMPP-CORE], each resource that received the roster push MUST reply
with an IQ stanza of type "result" (or "error").
Example: Resources reply with an IQ result ...
... session. A client MUST acknowledge each roster push with an IQ
stanza of type "result" (for the sake of brevity, these stanzas are
not shown in the following examples but are required by the IQ
...
... client MUST acknowledge each roster push with an IQ
stanza of type "result" (for the sake of brevity, these stanzas are
not shown in the following examples but are required by the IQ
semantics ...
... the new roster item. This request consists of sending an IQ
stanza of type='set' containing a <query/> element qualified by
...
... 3. If the user wants to request a subscription to the contact's
presence information, the user's client MUST send a presence
stanza of type='subscribe' to the contact:
...
... group/> child shown above.
5. The user's server MUST also stamp the presence stanza of type
"subscribe" with the user's bare JID ...
... host than
the user, the user's server MUST route the presence stanza to the
contact's server for delivery to the contact (this case is
...
... assumed throughout; however, if the contact is served by the same
host, then the server can simply deliver the presence stanza
directly):
...
... subscribe'/>
Note: If the user's server receives a presence stanza of type "error"
from the contact's server, it MUST deliver the error stanza to the
...
... Note: If the user's server receives a presence stanza of type "error"
from the contact's server, it MUST deliver the error stanza to the
user, whose client MAY determine that the error is in response to the
...
... user, whose client MAY determine that the error is in response to the
outgoing presence stanza of type "subscribe" it sent previously
(e.g., by tracking an 'id' attribute) and then choose to resend the
...
... subscribe" request or revert the roster to its previous state by
sending a presence stanza of type "unsubscribe" to the contact.
...
...
6. Upon receiving the presence stanza of type "subscribe" addressed
to the contact, the contact's server MUST determine if there is
...
... roster set specifying the desired nickname and group for the user
(if any); and (2) MUST send a presence stanza of type
"subscribed" to the user in order to approve the subscription
request.
...
... IQ result to the sending resource indicating the
success of the roster set; (3) MUST route the presence stanza of
type "subscribed" to the user, first stamping the 'from' address
...
... to='user@example.com'/>
Note: If the contact's server receives a presence stanza of type
"error" from the user's server, it MUST deliver the error stanza to
...
... Note: If the contact's server receives a presence stanza of type
"error" from the user's server, it MUST deliver the error stanza to
the contact, whose client MAY determine that the error is in response
...
... the contact, whose client MAY determine that the error is in response
to the outgoing presence stanza of type "subscribed" it sent
previously (e.g., by tracking an 'id' attribute) and then choose to
resend the "subscribed" notification ...
... notification or revert the roster to its
previous state by sending a presence stanza of type "unsubscribed" to
the user.
...
...
8. Upon receiving the presence stanza of type "subscribed" addressed
to the user, the user's server MUST first verify that the contact
is in the user's roster with either of the following states: (a)
...
... subscribe'. If the contact is not
in the user's roster with either of those states, the user's
server MUST silently ignore the presence stanza of type
"subscribed" (i.e., it MUST NOT route it to the user, modify the
...
... user's roster, or generate a roster push to the user's available
resources). If the contact is in the user's roster with either
of those states, the user's server (1) MUST deliver the presence
stanza of type "subscribed" from the contact to the user; (2)
MUST initiate a roster push to all of the user's available
resources that have requested the roster, containing an updated
...
... roster item for the contact with the 'subscription' attribute set
to a value of "to"; and (3) MUST deliver the available presence
stanza received from each of the contact's available resources to
each of the user's available resources:
...
...
9. Upon receiving the presence stanza of type "subscribed", the user
SHOULD acknowledge receipt of that subscription state
...
... state
notification through either "affirming" it by sending a presence
stanza of type "subscribe" to the contact or "denying" it by
sending a presence stanza ...
... presence
stanza of type "subscribe" to the contact or "denying" it by
sending a presence stanza of type "unsubscribe" to the contact;
this step does not necessarily affect the subscription state ...
... 1. If the contact wants to refuse the request, the contact's client
MUST send a presence stanza of type "unsubscribed" to the user
(instead of the presence stanza ...
... presence stanza of type "unsubscribed" to the user
(instead of the presence stanza of type "subscribed" sent in Step
6 of Section 8.2):
...
...
2. As a result, the contact's server MUST route the presence stanza
of type "unsubscribed" to the user, first stamping the 'from'
...
...
3. Upon receiving the presence stanza of type "unsubscribed"
addressed to the user, the user's server (1) MUST deliver that
...
... unsubscribed"
addressed to the user, the user's server (1) MUST deliver that
presence stanza to the user and (2) MUST initiate a roster push
to all of the user's available resources that have requested the
roster, containing an updated roster item ...
...
4. Upon receiving the presence stanza of type "unsubscribed", the
user SHOULD acknowledge receipt of that subscription state ...
... state
notification through either "affirming" it by sending a presence
stanza of type "unsubscribe" to the contact or "denying" it by
...
... unsubscribe" to the contact or "denying" it by
sending a presence stanza of type "subscribe" to the contact;
this step does not necessarily affect the subscription state ...
... subscribe' attribute in the roster
item; and (2) MUST route the presence stanza of type "subscribe"
to the user, first stamping the 'from' address ...
... subscribe'/>
Note: If the contact's server receives a presence stanza of type
"error" from the user's server, it MUST deliver the error stanza to
...
... Note: If the contact's server receives a presence stanza of type
"error" from the user's server, it MUST deliver the error stanza to
the contact, whose client MAY determine that the error is in response
...
... the contact, whose client MAY determine that the error is in response
to the outgoing presence stanza of type "subscribe" it sent
previously (e.g., by tracking an 'id' attribute) and then choose to
...
... subscribe" request or revert the roster to its previous
state by sending a presence stanza of type "unsubscribe" to the user.
...
...
3. Upon receiving the presence stanza of type "subscribe" addressed
to the user, the user's server must determine if there is at
...
... subscription request is defined in Section 8.3.1). In this case,
the user's client MUST send a presence stanza of type
"subscribed" to the contact in order to approve the subscription
request.
...
... 'subscription' attribute set to a value of "both"; (2) MUST route
the presence stanza of type "subscribed" to the contact, first
stamping the 'from' address as the bare JID ...
... of the user; and (3) MUST send to the contact the full XML of the
last presence stanza with no 'to' attribute received by the
server from each of the user's available resources (subject to
...
... to='contact@example.org'/>
Note: If the user's server receives a presence stanza of type "error"
from the contact's server, it MUST deliver the error stanza to the
...
... Note: If the user's server receives a presence stanza of type "error"
from the contact's server, it MUST deliver the error stanza to the
user, whose client MAY determine that the error is in response to the
...
... user, whose client MAY determine that the error is in response to the
outgoing presence stanza of type "subscribed" it sent previously
(e.g., by tracking an 'id' attribute) and then choose to resend the
subscription request ...
... subscription request or revert the roster to its previous state by
sending a presence stanza of type "unsubscribed" to the contact.
...
...
5. Upon receiving the presence stanza of type "subscribed" addressed
to the contact, the contact's server MUST first verify that the
user is in the contact's roster with either of the following
...
... subscribe'. If the user is not in
the contact's roster with either of those states, the contact's
server MUST silently ignore the presence stanza of type
"subscribed" (i.e., it MUST NOT route it to the contact, modify
...
... available resources). If the user is in the contact's roster
with either of those states, the contact's server (1) MUST
deliver the presence stanza of type "subscribed" from the user to
the contact; (2) MUST initiate a roster push to all available
resources associated with the contact that have requested the
...
... roster item for the user with the
'subscription' attribute set to a value of "both"; and (3) MUST
deliver the available presence stanza received from each of the
user's available resources to each of the contact's available
resources:
...
...
6. Upon receiving the presence stanza of type "subscribed", the
contact SHOULD acknowledge receipt of that subscription state
...
... state
notification through either "affirming" it by sending a presence
stanza of type "subscribe" to the user or "denying" it by sending
a presence stanza ...
... presence
stanza of type "subscribe" to the user or "denying" it by sending
a presence stanza of type "unsubscribe" to the user; this step
does not necessarily affect the subscription state ...
... 1. If the user wants to refuse the request, the user's client MUST
send a presence stanza of type "unsubscribed" to the contact
(instead of the presence stanza ...
... presence stanza of type "unsubscribed" to the contact
(instead of the presence stanza of type "subscribed" sent in Step
3 of Section 8.3):
...
...
2. As a result, the user's server MUST route the presence stanza of
type "unsubscribed" to the contact, first stamping the 'from'
...
...
3. Upon receiving the presence stanza of type "unsubscribed"
addressed to the contact, the contact's server (1) MUST deliver
...
... unsubscribed"
addressed to the contact, the contact's server (1) MUST deliver
that presence stanza to the contact; and (2) MUST initiate a
roster push to all available resources associated with the
contact that have requested the roster, containing an updated
...
...
4. Upon receiving the presence stanza of type "unsubscribed", the
contact SHOULD acknowledge receipt of that subscription state ...
... state
notification through either "affirming" it by sending a presence
stanza of type "unsubscribe" to the user or "denying" it by
sending a presence stanza ...
... presence
stanza of type "unsubscribe" to the user or "denying" it by
sending a presence stanza of type "subscribe" to the user; this
step does not necessarily affect the subscription state ...
... 1. If the user wants to unsubscribe from the contact's presence
information, the user MUST send a presence stanza of type
"unsubscribe" to the contact:
...
... 'subscription' attribute set to a value of "none"; and (2) MUST
route the presence stanza of type "unsubscribe" to the contact,
first stamping the 'from' address ...
...
3. Upon receiving the presence stanza of type "unsubscribe"
addressed to the contact, the contact's server (1) MUST initiate
...
...
4. Upon receiving the presence stanza of type "unsubscribe", the
contact SHOULD acknowledge receipt of that subscription state ...
... state
notification through either "affirming" it by sending a presence
stanza of type "unsubscribed" to the user or "denying" it by
sending a presence stanza ...
... presence
stanza of type "unsubscribed" to the user or "denying" it by
sending a presence stanza of type "subscribed" to the user; this
step does not necessarily affect the subscription state (see
...
... Section 9.4).
5. The contact's server then (1) MUST send a presence stanza of type
"unsubscribed" to the user; and (2) SHOULD send unavailable
presence ...
... unavailable'/>
6. When the user's server receives the presence stanzas of type
"unsubscribed" and "unavailable ...
...
7. Upon receiving the presence stanza of type "unsubscribed", the
user SHOULD acknowledge receipt of that subscription state ...
... state
notification through either "affirming" it by sending a presence
stanza of type "unsubscribe" to the contact or "denying" it by
sending a presence stanza ...
... presence
stanza of type "unsubscribe" to the contact or "denying" it by
sending a presence stanza of type "subscribe" to the contact;
this step does not necessarily affect the subscription state ...
... 1. If the user wants to unsubscribe from the contact's presence
information, the user MUST send a presence stanza of type
"unsubscribe" to the contact:
...
... 'subscription' attribute set to a value of "from"; and (2) MUST
route the presence stanza of type "unsubscribe" to the contact,
first stamping the 'from' address ...
...
3. Upon receiving the presence stanza of type "unsubscribe"
addressed to the contact, the contact's server (1) MUST initiate
...
...
4. Upon receiving the presence stanza of type "unsubscribe", the
contact SHOULD acknowledge receipt of that subscription state ...
... state
notification through either "affirming" it by sending a presence
stanza of type "unsubscribed" to the user or "denying" it by
sending a presence stanza ...
... presence
stanza of type "unsubscribed" to the user or "denying" it by
sending a presence stanza of type "subscribed" to the user; this
step does not necessarily affect the subscription state ...
... Section 9.4).
5. The contact's server then (1) MUST send a presence stanza of type
"unsubscribed" to the user; and (2) SHOULD send unavailable
presence ...
... unavailable'/>
6. When the user's server receives the presence stanzas of type
"unsubscribed" and "unavailable ...
...
7. Upon receiving the presence stanza of type "unsubscribed", the
user SHOULD acknowledge receipt of that subscription state ...
... state
notification through either "affirming" it by sending a presence
stanza of type "unsubscribe" to the contact or "denying" it by
sending a presence stanza ...
... presence
stanza of type "unsubscribe" to the contact or "denying" it by
sending a presence stanza of type "subscribe" to the contact;
this step does not necessarily affect the subscription state ...
...
1. If the contact wants to cancel the user's subscription, the
contact MUST send a presence stanza of type "unsubscribed" to the
user:
...
... 'subscription' attribute set to a value of "none"; (2) MUST route
the presence stanza of type "unsubscribed" to the user, first
stamping the 'from' address ...
...
3. Upon receiving the presence stanza of type "unsubscribed"
addressed to the user, the user's server (1) MUST initiate a
...
...
4. Upon receiving the presence stanza of type "unsubscribed", the
user SHOULD acknowledge receipt of that subscription state ...
... state
notification through either "affirming" it by sending a presence
stanza of type "unsubscribe" to the contact or "denying" it by
sending a presence stanza ...
... presence
stanza of type "unsubscribe" to the contact or "denying" it by
sending a presence stanza of type "subscribe" to the contact;
...
...
1. If the contact wants to cancel the user's subscription, the
contact MUST send a presence stanza of type "unsubscribed" to the
user:
...
... 'subscription' attribute set to a value of "to"; (2) MUST route
the presence stanza of type "unsubscribed" to the user, first
stamping the 'from' address ...
...
3. Upon receiving the presence stanza of type "unsubscribed"
addressed to the user, the user's server (1) MUST initiate a
...
...
4. Upon receiving the presence stanza of type "unsubscribed", the
user SHOULD acknowledge receipt of that subscription state ...
... state
notification through either "affirming" it by sending a presence
stanza of type "unsubscribe" to the contact or "denying" it by
sending a presence stanza ...
... presence
stanza of type "unsubscribe" to the contact or "denying" it by
sending a presence stanza of type "subscribe" to the contact;
this step does not necessarily affect the subscription state ...
...
Upon receiving the presence stanza of type "unsubscribe", the
contact's server (1) MUST initiate a roster push to all available
...
...
Upon receiving the presence stanza of type "unsubscribed", the
contact's server (1) MUST initiate a roster push to all available
...
...
Upon receiving the presence stanza of type "unavailable" addressed to
the contact, the contact's server MUST deliver the unavailable
presence ...
...
This section provides detailed information about subscription states
and server handling of subscription-related presence stanzas (i.e.,
presence stanzas of type "subscribe ...
... and server handling of subscription-related presence stanzas (i.e.,
presence stanzas of type "subscribe", "subscribed", "unsubscribe",
...
... Server Handling of Outbound Presence Subscription Stanzas ...
...
Outbound presence subscription stanzas enable the user to manage his
or her subscription to the contact's presence information (via the
"subscribe ...
... synchronization regarding subscription states, the user's
server MUST without exception route all outbound presence stanzas of
type "subscribe" or "unsubscribe ...
...
The user's server SHOULD NOT route a presence stanza of type
"subscribed" or "unsubscribed" to the contact if the stanza ...
... presence stanza of type
"subscribed" or "unsubscribed" to the contact if the stanza does not
result in a subscription state change from the user's perspective,
...
... state change from the user's perspective,
and MUST NOT make a state change. If the stanza results in a
subscription state change, the user's server MUST route ...
... subscription state change, the user's server MUST route the stanza to
the contact and MUST make the appropriate state change. These rules
...
... are summarized in the following tables.
Table 1: Recommended handling of outbound "subscribed" stanzas
+----------------------------------------------------------------+
...
...
Table 2: Recommended handling of outbound "unsubscribed" stanzas
+----------------------------------------------------------------+
...
... Server Handling of Inbound Presence Subscription Stanzas ...
...
Inbound presence subscription stanzas request a subscription-related
action from the user (via the "subscribe" type), inform the user of
...
... When the user's server receives a subscription request for the user
from the contact (i.e., a presence stanza of type "subscribe"), it
MUST deliver that request to the user for approval if the user has
...
... already granted the contact access to the user's presence
information, the user's server SHOULD auto-reply to an inbound
presence stanza of type "subscribe" from the contact by sending a
presence stanza ...
... presence stanza of type "subscribe" from the contact by sending a
presence stanza of type "subscribed" to the contact on behalf of the
user; this rule enables the contact to resynchronize the subscription
state ...
...
Table 3: Recommended handling of inbound "subscribe" stanzas
+------------------------------------------------------------------+
...
... +------------------------------------------------------------------+
* Server SHOULD auto-reply with "subscribed" stanza
When the user's server receives a presence stanza ...
... stanza
When the user's server receives a presence stanza of type
"unsubscribe" for the user from the contact, if the stanza ...
... presence stanza of type
"unsubscribe" for the user from the contact, if the stanza results in
a subscription state change from the user's perspective then the
...
... a subscription state change from the user's perspective then the
user's server SHOULD auto-reply by sending a presence stanza of type
"unsubscribed" to the contact on behalf of the user, MUST deliver the
...
... unsubscribed" to the contact on behalf of the user, MUST deliver the
"unsubscribe" stanza to the user, and MUST change the state. If no
subscription state change ...
... subscription state change results, the user's server SHOULD NOT
deliver the stanza and MUST NOT change the state. These rules are
summarized in the following table.
...
...
Table 4: Recommended handling of inbound "unsubscribe" stanzas
+------------------------------------------------------------------+
...
...
* Server SHOULD auto-reply with "unsubscribed" stanza
When the user's server receives a presence stanza ...
... stanza
When the user's server receives a presence stanza of type
"subscribed" for the user from the contact, it MUST NOT deliver the
stanza ...
... presence stanza of type
"subscribed" for the user from the contact, it MUST NOT deliver the
stanza to the user and MUST NOT change the subscription state if
there is no pending outbound request for access to the contact's
...
... there is no pending outbound request for access to the contact's
presence information. If there is a pending outbound request for
access to the contact's presence information and the inbound presence
stanza of type "subscribed" results in a subscription state change,
the user's server MUST deliver the stanza ...
... presence
stanza of type "subscribed" results in a subscription state change,
the user's server MUST deliver the stanza to the user and MUST change
the subscription state. If the user already has access to the
...
... the subscription state. If the user already has access to the
contact's presence information, the inbound presence stanza of type
"subscribed" does not result in a subscription state change;
...
... "subscribed" does not result in a subscription state change;
therefore the user's server SHOULD NOT deliver the stanza to the user
and MUST NOT change the subscription state. These rules are
...
... summarized in the following table.
Table 5: Recommended handling of inbound "subscribed" stanzas
+------------------------------------------------------------------+
...
... +------------------------------------------------------------------+
When the user's server receives a presence stanza of type
"unsubscribed" for the user from the contact, it MUST deliver the
...
... "unsubscribed" for the user from the contact, it MUST deliver the
stanza to the user and MUST change the subscription state if there is
a pending outbound request for access to the contact's presence
...
... information or if the user currently has access to the contact's
presence information. Otherwise, the user's server SHOULD NOT
deliver the stanza and MUST NOT change the subscription state. These
rules are summarized in the following table.
...
...
Table 6: Recommended handling of inbound "unsubscribed" stanzas
+------------------------------------------------------------------+
...
...
When a server receives an inbound presence stanza of type "subscribe"
(i.e., a subscription request ...
... require acknowledgement in the case of subscription requests, i.e.,
presence stanzas of type "subscribe"). In order to require
acknowledgement, a server SHOULD send the request or notification ...
...
+--------------------------------------------------+
| STANZA TYPE | ACCEPT | DENY |
+--------------------------------------------------+
...
... Obviously, given the foregoing subscription state charts, some of the
acknowledgement stanzas will be routed to the contact and result in
subscription state changes, while others will not. However, any such
...
... subscription state changes, while others will not. However, any such
stanzas MUST result in the server's no longer sending the
subscription state notification ...
... notification to the user.
Because a user's server MUST automatically generate outbound presence
stanzas of type "unsubscribe" and "unsubscribed" upon receiving ...
... (Section 8.6)), the server MUST treat a roster remove request as
equivalent to sending both of those presence stanzas for purposes of
determining whether to continue sending subscription state change
...
... group, or subscription type (or globally).
o Allowing or blocking IQ stanzas based on JID, group, or
...
... broadcasted to entities that are
subscribed to a user's presence information. Thus this includes
presence stanzas with no 'type' attribute or of type='unavailable'
only.
...
... user's roster, the server SHOULD return to the client an
<item-not-found/> stanza error.)
If the type is "subscription", then the 'value' attribute MUST be one
...
... update a list with non-unique order
values, the server MUST return to the client a <bad-request/> stanza
error.)
...
... enable an entity to specify more granular control over which kinds of
stanzas are to be blocked (i.e., rather than blocking all stanzas).
The allowable child elements ...
... entity to specify more granular control over which kinds of
stanzas are to be blocked (i.e., rather than blocking all stanzas).
The allowable child elements are:
...
... elements are:
o <message/> -- blocks incoming message stanzas
o <iq/> -- blocks incoming IQ stanzas
...
... o <message/> -- blocks incoming message stanzas
o <iq/> -- blocks incoming IQ stanzas
o <presence-in/> -- blocks incoming presence notifications
...
... namespace, the <query/> child of an IQ
stanza of type "set" MUST NOT include more than one child element
(i.e., the stanza ...
... stanza of type "set" MUST NOT include more than one child element
(i.e., the stanza MUST contain only one <active/> element, one
...
... target session/resource to
which a stanza is addressed, or if there are no current sessions
for the user.
...
... sessions for the user), and there is no default list,
then all stanzas SHOULD BE accepted or appropriately processed by
the server on behalf of the user in accordance with the Server
Rules for Handling XML Stanzas ...
... stanzas SHOULD BE accepted or appropriately processed by
the server on behalf of the user in accordance with the Server
Rules for Handling XML Stanzas (Section 11).
4. Privacy lists ...
... routing and delivery rules specified
in Server Rules for Handling XML Stanzas (Section 11), and (2)
the handling of subscription-related presence stanzas (and
...
... in Server Rules for Handling XML Stanzas (Section 11), and (2)
the handling of subscription-related presence stanzas (and
corresponding generation of roster pushes) specified in
Integration of Roster Items ...
... each <item/>.
6. As soon as a stanza is matched against a privacy list rule, the
server MUST appropriately handle the stanza ...
