mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-10 00:16:59 +00:00
`MlsGroupManager.decrypt` used to swallow the current-epoch exception via `decryptOrNull`, try retained epochs, then retry `group.decrypt`. After our inline-processCommit change this means a mid-commit throw leaves the group half-advanced, and the retry then reports a misleading "Message epoch N doesn't match current epoch N+1" — masking the real cause (unable-to-decrypt path, path-mismatch, etc.). Swap the order: call `group.decrypt` directly first, capture any exception, fall through to retained epochs, and re-raise the original exception if every epoch fails. Retains same semantics for messages that DO decrypt on the first try. https://claude.ai/code/session_1469d7f4-bb66-4ffa-a44d-1dfa4b526484