<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type='text/xsl' href='xep.xsl'?>
<xep xmlns="">
<header>
  <title>MUC is ready</title>
  <abstract>This specification provides a way for MUC components to inform clients that a room is ready to be re-joined.</abstract>
  
<legal>
<copyright>This XMPP Extension Protocol is copyright © 1999 – 2024 by the <link url="https://xmpp.org/">XMPP Standards Foundation</link> (XSF).</copyright>
<permissions>Permission is hereby granted, free of charge, to any person obtaining a copy of this specification (the "Specification"), to make use of the Specification without restriction, including without limitation the rights to implement the Specification in a software program, deploy the Specification in a network service, and copy, modify, merge, publish, translate, distribute, sublicense, or sell copies of the Specification, and to permit persons to whom the Specification is furnished to do so, subject to the condition that the foregoing copyright notice and this permission notice shall be included in all copies or substantial portions of the Specification. Unless separate permission is granted, modified works that are redistributed shall not contain misleading information regarding the authors, title, number, or publisher of the Specification, and shall not claim endorsement of the modified works by the authors, any organization or project to which the authors belong, or the XMPP Standards Foundation.</permissions>
<warranty>## NOTE WELL: This Specification is provided on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. ##</warranty>
<liability>In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall the XMPP Standards Foundation or any author of this Specification be liable for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising from, out of, or in connection with the Specification or the implementation, deployment, or other use of the Specification (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if the XMPP Standards Foundation or such author has been advised of the possibility of such damages.</liability>
<conformance>This XMPP Extension Protocol has been contributed in full conformance with the XSF's Intellectual Property Rights Policy (a copy of which can be found at &lt;<link url="https://xmpp.org/about/xsf/ipr-policy">https://xmpp.org/about/xsf/ipr-policy</link>&gt; or obtained by writing to XMPP Standards Foundation, P.O. Box 787, Parker, CO 80134 USA).</conformance>
</legal>
  <number>xxxx</number>
  <status>ProtoXEP</status>
  <type>Standards Track</type>
  <sig>Standards</sig>
  <approver>Council</approver>
  <dependencies>
    <spec>XMPP Core</spec>
    <spec>XEP-0045</spec>
    <spec>XEP-0249</spec>
  </dependencies>
  <supersedes/>
  <supersededby/>
  <shortname>NOT_YET_ASSIGNED</shortname>
  <tags><tag>muc</tag></tags>
  <author>
    <firstname>Nicolas</firstname>
    <surname>Cedilnik</surname>
    <email>nicoco@nicoco.fr</email>
    <jid>nicoco@nicoco.fr</jid>
  </author>
  <revision>
    <version>0.0.1</version>
    <date>2026-09-29</date>
    <initials>nc</initials>
    <remark><p>First draft.</p></remark>
  </revision>
</header>
<section1 topic="Introduction" anchor="intro">
  <p>When the service hosting a <span class="ref"><link url="https://xmpp.org/extensions/xep-0045.html">Multi-User Chat (XEP-0045)</link></span> <note>XEP-0045: Multi-User Chat &lt;<link url="https://xmpp.org/extensions/xep-0045.html">https://xmpp.org/extensions/xep-0045.html</link>&gt;.</note> room shuts down, e.g., for a software upgrade, it informs XMPP clients by sending them an "unavailable" presence with a dedicated status code (332).
It is then up to the client to attempt to re-join the room, either periodically, or via a user-triggered action.</p>
  <p>This specification describes a mechanism for the MUC service to inform XMPP clients that the MUC service is now operational again, and that rooms are ready to be re-joined.
This removes the need for periodic re-tries, reducing client-generated traffic.
It also prevents situations where a user expects to still "be in a room" and receive its live messages when their client actually expects a manual action from them.</p>
</section1>
<section1 topic="Use Cases" anchor="usecases">
  <ul>
    <li>MUC service restarts independently of the XMPP server it is a component of. Examples: independent MUC implementation, gateways.</li>
    <li>XMPP server restarts and want to inform remote affiliated JIDs that rooms are available again and that they can join.</li>
  </ul>
</section1>
<section1 topic="Protocol" anchor="protocol">
  <p>When a MUC service wants to inform that it is back online, it sends XMPP clients a <span class="ref"><link url="https://xmpp.org/extensions/xep-0249.html">Direct MUC Invitations (XEP-0249)</link></span> <note>XEP-0249: Direct MUC Invitations &lt;<link url="https://xmpp.org/extensions/xep-0249.html">https://xmpp.org/extensions/xep-0249.html</link>&gt;.</note> with a dedicated "ready" element in the message stanza.</p>
  <example caption="An invitation payload sent by a room after the MUC service has started"><![CDATA[
<message from='rooms.example.org'
         to='user@example2.org'>
  <x xmlns='jabber:x:conference'
     jid='room@rooms.example.org'
     reason='The MUC service is back up and you are a member of this room. Please join!'/>
  <ready xmlns='urn:xmpp:muc-ready:0' />
</message>
]]></example>
  <p>
    Supporting clients should attempt re-joining the MUC at this stage.
    Non-supporting XMPP clients treat this like any other invitation, so this automatically acts a fallback for them.
  </p>
</section1>
<section1 topic="Implementation Notes" anchor="impl">
  <p>
     MUC services supporting this feature SHOULD advertise 'urn:xmpp:muc-ready:0' in the disco#features of their rooms.
     Clients can tweak or disable their periodic rejoin attempt behaviour based on this feature's availability for a given room or MUC service.
  </p>
  <p>Clients supporting this feature SHOULD NOT display such invitations in their user interface.</p>
  <p>This specification is not intended to replace <span class="ref"><link url="https://xmpp.org/extensions/xep-0410.html">MUC Self-Ping (Schrödinger's Chat) (XEP-0410)</link></span> <note>XEP-0410: MUC Self-Ping (Schrödinger's Chat) &lt;<link url="https://xmpp.org/extensions/xep-0410.html">https://xmpp.org/extensions/xep-0410.html</link>&gt;.</note>; it solves a different practical issue encountered in deployments of <span class="ref"><link url="https://xmpp.org/extensions/xep-0045.html">Multi-User Chat (XEP-0045)</link></span> <note>XEP-0045: Multi-User Chat &lt;<link url="https://xmpp.org/extensions/xep-0045.html">https://xmpp.org/extensions/xep-0045.html</link>&gt;.</note>.</p>
  <p>
    The protocol described in this document is not necessary for local users of MUC services tightly coupled to their "host" XMPP server.
    Under such circumstances, the issue addressed by this specification can be tackled in a custom and possibly more efficient way, eg, by persisting occupants across restarts and not informing clients at all.
  </p>
</section1>
<section1 topic="Accessibility Considerations" anchor="access">
  <p>None.</p>
</section1>
<section1 topic="Security Considerations" anchor="security">
  <p>None.</p>
</section1>
<section1 topic="Privacy Considerations" anchor="privacy">
  <p>This specification could be abused to trap clients into joining rooms that the user does not intend to be an occupant of.
After receiving a <tt>ready</tt> payload, clients MUST ensure that being an occupant of the room is compatible the user's intent, i.e., that the user had previously intended to join this room and did not explicitly left it since.</p>
</section1>
<section1 topic="IANA Considerations" anchor="iana">
  <p>None.</p>
</section1>
<section1 topic="XMPP Registrar Considerations" anchor="registrar">
  <p>This specification defines a new namespace: 'urn:xmpp:muc-ready'</p>
</section1>
<section1 topic="XML Schema" anchor="schema">
  <code><![CDATA[
<?xml version='1.0' encoding='UTF-8'?>
<xs:schema
    xmlns:xs='http://www.w3.org/2001/XMLSchema'
    targetNamespace='urn:xmpp:muc-ready:0'
    xmlns='urn:xmpp:muc-ready:0'
    elementFormDefault='qualified'>
  <xs:annotation>
    <xs:documentation>
      This schema defines the 'ready' element used to signal that a MUC
      service is operational and rooms are ready to be rejoined.
    </xs:documentation>
  </xs:annotation>
  <xs:element name='ready' />
</xs:schema>]]>
</code>
</section1>
</xep>
