[ejabberd] pubsub delivery ignores /resource

kael ka-el at laposte.net
Tue Feb 2 12:43:04 MSK 2010


On 02/01/2010 09:26 PM, Liam wrote:
> Node config:
> 
>     'pubsub#notify_retract': '0',
>     'pubsub#persist_items': '0',
>     'pubsub#publish_model': 'open',
>     'pubsub#access_model': 'whitelist',
>     'pubsub#send_last_published_item': 'never',
>     'pubsub#notification_type': 'normal'

With this node configuration, it is a normal result. The Pubsub server 
sends messages without consideration of the availability of the full 
JID. So if only one resource is connected, it will receive all messages.

In your case, I'd say that theoretically the node should be configured 
with :

<field var="pubsub#presence_based_delivery">
   <value>1</value>
</field>

This way, an available full JID should receive only messages intended to 
  it, not to other resources.

I've tested with such a node configuration using ejabberd/2.1.x (rev 
2949). In case of multiple subscriptions with different full JID, the 
server still sends all messages to all resources, so if there's only one 
resource available it receives all of messages.

I think it's a bug, but the XEP is not very clear on that point.
cf.<http://xmpp.org/extensions/xep-0060.html#subscriber-subscribe-multi>

-- 
kael



More information about the ejabberd mailing list