matrix-rust-sdk icon indicating copy to clipboard operation
matrix-rust-sdk copied to clipboard

More detailed failures for decryptRoomEvent call

Open BillCarsonFr opened this issue 3 years ago • 0 comments

Currently the decryptRoomEvent only throws a generic error. For proper display on the UI, as well for some integration test we need to have more information. It would be nice to have at least the following errors to stay compatible:

  • UNKNOWN_INBOUND_SESSION_ID (UISIs)
  • UNKNOWN_MESSAGE_INDEX (partially withheld session)
  • DUPLICATED_MESSAGE_INDEX (Is this managed by the SDK? or de we have to do it at the app level?)

We will also need additional information in the case of UNKNOWN_INBOUND_SESSION_ID, particularly the withheld code if any. So we would need an additional API to query for a withheld code for a given megolm session. We want the withheld code from the initiator of the session not one that could have been received via a reply of a key request from another of our own device.

BillCarsonFr avatar Jun 06 '22 12:06 BillCarsonFr