Implement XEP-0410: MUC Self-Ping (Schrödinger's Chat)
From XEP-0410: MUC Self-Ping (Schrödinger's Chat):
The Multi-User Chat (XEP-0045) protocol was not designed to handle s2s interruptions or message loss well. Rather often, the restart of a server or a component causes a client to believe that it is still joined to a given chatroom, while the chatroom service does not know of this occupant.
This specification aims to provide the most efficient, albeit not the most elegant, way for clients to periodically check whether they are still joined to a chatroom. However, it can not ensure that a client remains joined to a room without any interruptions.