Abstract: This specification defines XMPP protocol extension allowing XMPP clients to specify rules for XMPP server to filter Push Notifications generated for groupchat messages before sending them to Push Notification Component.
- 1. Introduction
- 2. Scope
- 3. Requirements
- 4. Filtering groupchat notifications
XEP-0357: Push Notifications defines a way for the XMPP server to generate push notifications by publishing them to the application specific XMPP Push Notification Component. However, that extension does not specify any rules for generating push notifications, nor any rules for filtering them forcing XMPP servers to publish notifications about any incoming messages while XMPP client is not connected.
This extension was created to provide those rules for filtering notifications for groupchat messages, which SHOULD reduce load on the XMPP clients (ie. on mobile devices) by reduced number of push notifications sent to them.
This documents specifies ways of defining rules for filtering generated push notifications for groupchat messages. Those rules are extensions to payload send to enable push notifications as specified in XEP-0357: Push Notifications.
The XMPP server MUST support XEP-0357: Push Notifications as this specification is the extension to push notifications.
With usage of MUC users may want to receive some of the notifications. In some rooms all of them, in some none of notifications and in some rooms notifications only when their nick is mentioned in the message.
Note: This feature is supported only for MUC rooms which have support for sending messages to unavailable occupants (see Tigase custom extension).
Before enabling this feature, a client SHOULD determine whether user’s server supports filtering push notifications from MUC rooms; to do so, it MUST send a Service Discovery (XEP-0030)  information query to the user’s bare JID:
Example 1. Client queries server regarding protocol support
<iq email@example.com/mobile' firstname.lastname@example.org' id='x13' type='get'> <query xmlns='http://jabber.org/protocol/disco#info'/> </iq>
Example 2. Server communicates protocol support
<iq email@example.com' firstname.lastname@example.org/balcony' id='disco1' type='result'> <query xmlns='http://jabber.org/protocol/disco#info'> <identity category='account' type='registered'/> <feature var='tigase:push:filter:groupchat:0'/> ... </query> </iq>
To enable this filter, XMPP client SHOULD send enable request with
<groupchat /> element qualified by the
This element SHOULD contains list of rules for all groupchats for which notifications SHOULD be sent. Each rule MUST be specified as
<room /> element. It MUST have
jid attribute set to groupchat bare JID and
allow attribute set to:
always- to receive notifications for all messages
never- to never receive notifications
mentioned- to receive notifications when mentions.
mentioned is passed as a value for
allow attribute, then
nick attribute MUST be set as well to the value of a nickname for which notifications SHOULD be generated.
Example 3. Enabling filter
<iq type='set' id='x42'> <enable xmlns='urn:xmpp:push:0' jid='push-5.client.example' node='yxs32uqsflafdk3iuqo'> <groupchat xmlns='tigase:push:filter:groupchat:0'> <room email@example.com' allow='always' /> <room firstname.lastname@example.org' allow='mentioned' nick='Juliet' /> </muc> </enable> </iq>