powered by Jive Software

Pubsub Notification type

With regard to API to configure pubsub node to send normal message

I’m proposing to add

public enum NotificationType {

with a corresponding entry in

public enum ConfigureNodeFields

And access functions for class ConfigureForm.

What I really need here is advice regarding XMPP standards (official or habitual) regarding notification types.

Is it a good idea to fix these options as enums on the client side ? Are they fixed ? Do different servers offer different options ?

Maybe a better way to go would be to only allow the options to be generated by a reply from the server (after a config request) and provide some kind of selection mechanism.

It’s harder with the create-with-configure case, since you need to know a priori what the server is going to accept.

Perhaps the best possible solution is to provide default “typical” options, but to replace these if an option query indicates a different set of options.

Probably I’m over-thinking this :wink:

Are fixed enums fine, because in practice servers only ever offer these options ?


They are standardized and fixed, see XEP-0060 16.4.4 pubsub#node_config FORM_TYPE

  <field var='pubsub#notification_type' type='list-single'
         label='Specify the delivery style for notifications'>
    <option label='Messages of type normal'>
    <option label='Messages of type headline'>

Perfectly fine.