Reputation: 11
The user romeo@host creates a LeafNode 0c55624367fc10d2548c569782f569dc:downline
by this configuration:
("pubsub#deliver_payloads", "true")
("pubsub#notify_config", "false")
("pubsub#notify_delete", "false")
("pubsub#notify_retract", "false")
("pubsub#purge_offline", "false")
("pubsub#persist_items", "true")
("pubsub#publish_model", "open")
("pubsub#max_items", "50")
("pubsub#subscribe", "false")
("pubsub#access_model", "open")
("pubsub#send_last_published_item", "never")
("pubsub#deliver_notifications", "false")
Creates an item like this:
<item id='downline'>
<downline xmlns='pubsub:mecloak:users:downline'>
<downline>
{"users":[{"username":"do hdhddkd","userphone":"+8801111111147"}]}
</downline>
</downline>
</item>
User juliet@host tries to update/publish in the same node in this way:
<iq to='pubsub.192.168.0.100' id='1P42B-58' type='set'>
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
<publish node='0c55624367fc10d2548c569782f569dc:downline'>
<item id='downline'>
<downline xmlns='pubsub:mecloak:users:downline'>
<downline xmlns='pubsub:mecloak:users:downline'>
{"users":[{"username":"chhy","userphone":"+8801111111147"},{"username":"do hdhddkd","userphone":"+8801111111147"}]}
</downline>
</downline>
</item>
</publish>
</pubsub>
</iq>
But juliet is getting an error like this:
<iq xml:lang='en-US' to='[email protected]/12934698245865334251579' from='pubsub.192.168.0.100' type='error' id='1P42B-58'>
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
<publish node='0c55624367fc10d2548c569782f569dc:downline'>
<item id='downline'>
<downline xmlns='pubsub:mecloak:users:downline'>
<downline>
{"users":[{"username":"chhy","userphone":"+8801111111147"},{"username":"do hdhddkd","userphone":"+8801111111147"}]}
</downline>
</downline>
</item>
</publish>
</pubsub>
<error type='auth'>
<forbidden xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
</error>
</iq>
Am I missing a point, perhaps a configuration?
Upvotes: 0
Views: 107
Reputation: 11
After research, I find out the problem. The problem was not within the configuration but within the item id.
<item id='downline'>
<downline xmlns='pubsub:mecloak:users:downline'>
<downline>
{"users":[{"username":"do hdhddkd","userphone":"+8801111111147"}]}
</downline>
</downline>
</item>
in Romeo's case the item id was downline and also in Juliet's case the id was downline
<item id='downline'>
<downline xmlns='pubsub:mecloak:users:downline'>
<downline xmlns='pubsub:mecloak:users:downline'>
{"users":[{"username":"chhy","userphone":"+8801111111147"},{"username":"do hdhddkd","userphone":"+8801111111147"}]}
</downline>
</downline>
</item>
juliet has no right to override romeo's item that is why server rejects it.
juliet changed the item id and it works fine. :)
Upvotes: 0