I found myself a few days ago writing a getOrCreateLeafNode() method for
Smack's PubSubManager [1] and noticed that Smack has a similar method
for MUC (createOrJoin(), [2]). Both methods are often required, e.g. you
need the PubSub one for OMEMO (or everything PEP). But both methods are
inherent racy.

I believe that users find themselves often in the situation where they
just want to join a MIX channel, while simply creating it if it does not
already exist.

Maybe this is a reason to add this as MIX protocol feature, so that
libraries do not have to implement them composing join and create
primitives with all the drawbacks?

- Florian

1:
https://github.com/igniterealtime/Smack/blob/08c228ef99b59c7c16b44941875e1ea640db3b62/smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/PubSubManager.java#L272
2:
https://github.com/igniterealtime/Smack/blob/08c228ef99b59c7c16b44941875e1ea640db3b62/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/MultiUserChat.java#L483

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Standards mailing list
Info: https://mail.jabber.org/mailman/listinfo/standards
Unsubscribe: [email protected]
_______________________________________________

Reply via email to