Closed singpolyma closed 8 years ago
Also, we don't know who is in the room if we were out for awhile.
On start, we cannot assume we know anything about the existence of rooms or who is in them. So we need to query the world and sync it to our expectations.
For each MUC we know about, pick the first of our jids that ought to be joined and send presence to the MUC for that one. Store the other tels in a new key MUC \0 startup_tels
When getting final, check for the existence of MUC \0 startup_tels
and for each one that is not now in the presence (which should be either all of them if we were forgot, or none of them if we're still in) and send presence for them as well. Clear the key out before sending.
Forget "creating", we created if we're the only one in the room on join. Because reasons
Use https://xmpp.org/extensions/xep-0045.html#disco-roomitems to get list of members. Re-joining doesn't work unless you part first.
If remote MUC is restarted, then I think everyone will be told they have left and will at least know to re-join manually. Or something. That would suck a bit.
For the local Prosody, we need re-join also, because we think we're in, and they've forgot we exist.