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> |
||
|---|---|---|
| .. | ||
| libs | ||
| src/main | ||
| build.gradle.kts | ||
| proguard-rules.pro | ||