ref: caf03566293d1a36acc340ea4029ccc78c756581 cheogram-muc-bridge/Session.hs -rw-r--r-- 6.4 KiB
Use non-extra-payload algorthm for rooms that don't support it

Such as biboumi rooms
Fix <<loop>> caused by accidental name shadowing
Detect presence from ghost using custom element

Instead of trying to "remember" who is a ghost based on fragile things like
which nick we asked for, which is subject to race conditions in the case of
rewriting, etc, just send an extra presence payload for a ghost that only we
generate and detect it on inbound.

This will only work if the MUC remembers the actual presence stanza it got and
sends that for all future presences from a member, which the spec doesn't seem
to specifically require, but implementations do (and need to, for things like
avatars to work).
Allow no subscript
Don't leave if just renaming
Keep knowledge of a ghost as long as possible

INSERT the ghost before we actually join them to the room. Only DELETE them
after we get the self-presence about them leaving.

Do not INSERT and join when we get presence errors or presence unavaiable!
If a ghost has leaked through, remove it
Allow specifying nickLength for a MUC
Custom tag per source and nick char filter for target
Detect ghost presence from DB instead of by looking for tag in nick
Remove stale nicks that are no longer present on other side after restart
Replace mentioned nicks with their ghost equivalent
Store sessions in db