Issue with PubSub when user subscribes with a full JID
I found the following issue when user subscribes with a full JID:
- Signed in with 2 users that share the same bare JID:
- Subscribed with email@example.com/foo to node pubsub_test using HTTP API:
<data> <node>pubsub_test</node> <jids> <value>firstname.lastname@example.org/foo</value> </jids> </data>
- Published a message to pubsub_test node:
<data> <node>pubsub_test</node> <item-id>item-001</item-id> <entry> <item-entry> <title>Test</title> <content>Pubsub test</content> </item-entry> </entry> </data>
In the case above, I only expect the email@example.com/foo receive the pubsubs notification, however both firstname.lastname@example.org/foo and email@example.com/bar receive the pubsub notification. Seems like the pubsusb notification is based on bare JID, not full JID, since both users receive the same notification:
<message from="firstname.lastname@example.org" to="email@example.com" id="4"> <event xmlns="http://jabber.org/protocol/pubsub#event"> <items node="pubsub_test"> <item id="item-001"> <item-entry> <title>Test</title> <content>Pubsub test</content> </item-entry> </item> </items> </event> </message>
According to XMPP specs (XEP-0060, Sec 6.1.6), if a full JID is used to subscribe to a node, the service must treat users with the same bare JID but different full JID (as in the case above) as separate JIDs for the purpose of generating event notifications. (see http://xmpp.org/extensions/xep-0060.html#subscriber-subscribe-multi).
Can this be achieved in Tigase? Is there a configuration option to support this feature?