singpolyma / cheogram

Moved to https://git.singpolyma.net/cheogram
https://cheogram.com
GNU Affero General Public License v3.0
27 stars 5 forks source link

If cheogram is down a long time, MUC might forget we are joined. So we might need to rejoin and re-ownerify everyone #25

Closed singpolyma closed 8 years ago

singpolyma commented 8 years ago

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.

singpolyma commented 8 years ago

Also, we don't know who is in the room if we were out for awhile.

singpolyma commented 8 years ago

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

singpolyma commented 8 years ago

Use https://xmpp.org/extensions/xep-0045.html#disco-roomitems to get list of members. Re-joining doesn't work unless you part first.