[ejabberd] Subscribing to a parent node

kael ka-el at laposte.net
Sun Jan 24 18:47:30 MSK 2010


On 01/23/2010 11:09 AM, Vincent Courcelle wrote:
> As I'm not able to make this working correctly, I though to another way, 
> more extensible, to achieve the same: filtered notifications.
> Users wishing to be notified on only certain datas might request a 
> filtered subscription.
> Is it possible to assign attributes to published items? And how, at 
> subscription, do I request the server to filter the notifications based 
> on attributes matching a pattern?
> This doesn't seems to be what I want (or I didn't understood how to do 
> it): http://xmpp.org/extensions/xep-0060.html#filtered-notifications

That case of 'filtered notifications' refers to the implicit 
subscriptions of Pubsub-on-JID nodes (e.g. : PEP geolocation) and is 
based on the name of the node, not the content of the payload.

> For example, the server publishes the item:
> <item brand="mercedes" model="sl500"><body>Great car</body></item>
> <item brand="bmw" model="m5"><body>Horse power!</body></item>
> 
> Clients subscribes to (in order to save bandwidth):
> item[brand='mercedes']
> and is only notified of:
> <item brand="mercedes" model="sl500"><body>Great car</body></item>
> 
> Do you have any idea how to do that?

XEP-0060 defines a content-based subscription system 
<http://xmpp.org/extensions/xep-0060.html#impl-content>, but it's not 
implemented in ejabberd.

-- 
kael



More information about the ejabberd mailing list