Jeffrey Hsu
Jeffrey Hsu

Reputation: 305

Can the xmpp pubsub service(XEP-0060) create a node when it receives a subscribe request?

We use XMPP XEP-0060 pub/sub feature to build a notification system.

According to XEP-0060, node can be created automatically when publishing.

My question is can it be created when subscribing?

If not, is there any alternative solution to implement this? (create node after subscribed)

Thanks

Upvotes: 1

Views: 516

Answers (2)

Robin
Robin

Reputation: 24262

Not via the XEP, as it doesn't specifically have that use case. You will have to either use a server that supports this natively, (as mentioned by @MattJ) or extend one to do so yourself, as most XMPP servers have some form of plugin/extension mechanism built in.

The caveat though, is that this is no longer to spec and you will be tied to a specific implementation so your application will not be portable.

Upvotes: 1

MattJ
MattJ

Reputation: 7924

There's no inherent reason this can't be done transparently on the server-side. Prosody has a service-wide autocreate_on_subscribe option, for example.

Upvotes: 2

Related Questions