MultiUserChat.join() always creates a default available Presence

The Presence object is generated by MultiUserChat.enter() as follows:

    Presence joinPresence = new Presence(Presence.Type.available);

    final FullJid jid = JidCreate.fullFrom(room, nickname);

    joinPresence.setTo(jid);

    ...

If an application wishes to change the user’s status in the MUC, it needs to call muc.changeAvailabilityStatus() on the MUC (or on all MUCs). It might be worthwhile to optimize this by allowing the client to set an initial Presence that is not the default “available” one.

The sendPresence in ConnectionConfiguration.java is as default true

which is why the smack library automatically sends an initial presence to the server as available.

you can set it to .setSendPresence(false) while building your configuration and send your own presence in after the “authenticated” function triggers in your connection listener.

Tracked with SMACK-648 and https://github.com/igniterealtime/Smack/wiki/MUC-API-Redesign