Why it matters
Matrix E2EE bots must handle megolm/olm carefully; many automation bots stay in unencrypted rooms instead of holding decryption keys.
Practical steps
- Decide explicitly: encrypted rooms or not — document it.
- If you decrypt, protect the store like a password vault.
- Use a maintained SDK (matrix-nio, matrix-bot-sdk).
- Plan device verification UX.
- Never log plaintext from encrypted rooms.
Watch out for
- Storing session keys next to the bot token in plaintext.
- Joining encrypted rooms without a recovery story.