0
votes

I am using MongooseIM 3.1 version along with mongooseim push feature. According to the guide, we need to create a new node for push and then enable it. I have following doubts regarding the same.

  1. How can I hide this node (node created due to push feature) from other users, since this node is not relevant to other users. I just want to make it hide from other users via service discovery stanzas.

  2. IS there any harm if anyone knows our node push name?

1

1 Answers

0
votes

Answering to your first questions, you can create the push node in the following way:

<iq type='set' to='pubsub.mypubsub.com' id='create1'>
  <pubsub xmlns='http://jabber.org/protocol/pubsub'>
    <create node='punsub_node_for_my_private_iphone' type='push'/>
    <configure>
      <x xmlns='jabber:x:data' type='submit'>
        <field var='FORM_TYPE' type='hidden'>
          <value>http://jabber.org/protocol/pubsub#node_config</value>
        </field>
        <field var='pubsub#access_model'>
          <value>whitelist</value>
        </field>
        <field var='pubsub#publish_model'>
          <value>publishers</value>
        </field>
       </x>
    </configure>
  </pubsub>
</iq>

Please note the node configuration. The access_model is set to whitelist so only whitelisted users can access (see the node). It's OK to leave it empty, then only owner will see it.

Also there is the publish_model set to publishers which means that only owner or users with affiliation publish or publish_only can publish to this node.

MongooseIM generates publish request on behalf of the node's owner so in fact you don't have to add any other user as a publisher to the push node.

Let me know if his helps and answers your questions.