Files
matrix-quotes-bot/index.js
unfunny cbc23c0325 Rewrite keys/upload OTK-collision 400 into synthetic 200
Rust crypto uses an in-memory store (no IndexedDB in Node), so after a
restart it re-uploads one-time keys it already published. Synapse rejects
the duplicate with a 400; the SDK never marks the request as sent, so it
retries forever and the bot can never decrypt. Intercept that specific
400 and return a fake success with empty one_time_key_counts, which makes
the machine mint fresh OTK ids that upload cleanly.
2026-09-13 17:08:11 -04:00

6.4 KiB