1
votes

I am using XMPP Pubsub (XEP-0060). My application has the following requirements:

  1. Users can create pubsub nodes: This is working fine.
  2. Users can subscribe to already created nodes and automatically become publishers without owner intervention. I am in a situation where I need everybody on the node to be both a publisher and subscriber.

The problem I have is that after I subscribe a new user to the PubSub node, they have a "none" affiliation by default. There is no way to change the affiliation from my client application as the only the owner can change affiliations.

Am I missing a setting in the XEP-0060 that can help achieve this behavior?

1
Which XMPP server are you using ?Mickaël Rémond
I am using openfire.musimbate

1 Answers

1
votes

If you control the client that create the node, you can consider looking into the publish_model option of the PubSub node.

The default publish_model is publishers, but there are other options available such as subscribers and open. Setting the publish_model option of your PubSub node to subscribers should help you achieve what you need.

Depending on the actual XMPP server you are using, the feature may or may not be available. It should work with ejabberd latest version configured to use node type hometree.