Commit graph

5 commits

Author SHA1 Message Date
ltadeu6
3747172488 Fix E2EE encryption surviving app restarts
Six interconnected fixes to make Olm/Megolm state persist correctly
across restarts:

- Fix OlmAccount/OlmSession unpickle argument order (data, key) — was
  reversed, causing INVALID_BASE64 on every restore
- Fix pickle byte encoding: pickle() returns ByteArray, not StringBuffer;
  encode/decode with ISO_8859_1
- Track publishedOtkCount in SharedPreferences to avoid evicting existing
  OTKs on restore (only generate MAX - published new keys)
- Delay startSync() until after uploadKeys() on fresh login to avoid
  concurrent OlmAccount access (race condition causing BAD_MESSAGE_KEY_ID)
- Persist encryptedRooms to SharedPreferences so rooms stay encrypted
  across restarts
- Check m.room.encryption in both state and timeline events (server
  returns it in timeline for rooms where encryption was enabled early)

Also adds SAS device verification UI, DM naming improvements, and
updates state.md with full architecture and debugging notes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-17 15:21:09 -03:00
ltadeu6
b30e83898c Add chat UX improvements and fix DM naming sync 2026-05-16 16:24:32 -03:00
ltadeu6
700289fef9 Add Nix shell and local 16KB-aligned Olm build 2026-05-16 15:59:41 -03:00
ltadeu6
9bc3651341 Ignore generated build artifacts 2026-05-14 23:24:47 -03:00
ltadeu6
71af5efc4e Initial commit 2026-05-14 23:22:06 -03:00