[jdev] Invisibility and MUCs

Will Thompson will.thompson at collabora.co.uk
Tue Feb 22 08:35:35 CST 2011

Hi folks,

Yesterday I accidentally set myself to invisible, and realised that I'd
parted all the MUCs I was in. I went off to consult XEP-0126 and
XEP-0186 to see what they say about MUCs, and the answer—to my
surprise—is “nothing”. I believe it should be possible to join MUCs
while invisible, and remain in MUCs when you transition from visible to

XEP-0186 §3.1 stipulates that, when the user becomes invisible:

> the server MUST send <presence type='unavailable'/> presence from the
> specified resource to all contacts who would receive unavailable
> presence if the client sent <presence type='unavailable'/>.

I think we could add:

> but not to contacts who have received
> directed presence from the client (for instance, <a
> href='xep-0045'>Multi-User Chat</a> rooms the user is a member of).

While the client is invisible, the server MUST relay everything we need
for MUCs in both directions, so it's only the visible→invisible
transition that needs clarification.

XEP-0126 is more problematic. It could recommend the the client be
selectively visible to each MUC's JID, as per §3.2.1, which would allow
joining MUCs while invisible. But §3.5 says that the user becomes
invisible by first broadcasting unavailable presence.  Thus, the
visible→invisible transition parts all your MUCs. Any suggestions for
how to deal with this, short of:

• Activate a privacy list blocking outbound presence to your MUCs;
• Broadcast unavailable presence (which will not be sent to the
  aforementioned MUCs);
• Invert the privacy list, to *only* allow presence-out to those MUCs.

which sounds nuts to me. :)


More information about the JDev mailing list