mirror of
https://github.com/prosolis/gogobee.git
synced 2026-07-15 00:32:40 +00:00
Without /sync nothing backfills the state store, so a room the bot had not yet heard from looked unencrypted -- IsEncrypted answers false with no error -- and any message the bot started on its own (ambient DMs, expedition beats, briefings) went out in the clear. Under /sync the cryptohelper registered StateStoreSyncHandler and the initial sync carried every joined room's state, so the store was warm before the bot ever spoke; the appservice port replicated the crypto plumbing but not that backfill. Resolve encryption and membership from the server on first read instead, and refuse the send when they cannot be resolved: a message that fails is recoverable, a plaintext one that has landed is not. Members are resolved the same way, since an unfetched room shares the group session with nobody.