Skip to content

Fix key storage if it's broken#6290

Draft
andybalaam wants to merge 1 commit intodevelopfrom
andybalaam/fix-backup-if-needed
Draft

Fix key storage if it's broken#6290
andybalaam wants to merge 1 commit intodevelopfrom
andybalaam/fix-backup-if-needed

Conversation

@andybalaam
Copy link
Member

@andybalaam andybalaam commented Mar 5, 2026

Content

When recovering from Recovery, use the new recoverAndFixBackup method that fixes key storage if the public and private keys are out of sync.

(Depends on matrix-org/matrix-rust-sdk#6252)

Motivation and context

For element-hq/element-meta#3059 we want to detect when the key storage keys are inconsistent, and automatically fix the problem by creating a new backup. This change does that using the functionality recently added to matrix-rust-sdk.

Screenshots / GIFs

Nothing changes visually, except after the "Key Storage Out Of Sync" banner appears and we choose "Enter Recovery Key" and enter it, the banner disappears. Previously, if backup keys were out of sync, it would remain.

Tests

No tests were changed.

Tested devices

  • Physical
  • Emulator
  • OS version(s): Android 16.0

Checklist

  • Changes have been tested on an Android device or Android emulator with API 24
  • UI change has been tested on both light and dark themes
  • Accessibility has been taken into account. See https://github.com/element-hq/element-x-android/blob/develop/CONTRIBUTING.md#accessibility
  • Pull request is based on the develop branch
  • Pull request title will be used in the release note, it clearly define what will change for the user
  • Pull request includes screenshots or videos if containing UI changes
  • You've made a self review of your PR

@ElementBot
Copy link
Collaborator

ElementBot commented Mar 5, 2026

Fails
🚫

Please add a PR- label to categorise the changelog entry.

Generated by 🚫 dangerJS against 7be76a6

@andybalaam andybalaam force-pushed the andybalaam/fix-backup-if-needed branch from 5f5ea80 to 7be76a6 Compare March 9, 2026 13:32
@andybalaam andybalaam added the PR-Bugfix For bug fix label Mar 9, 2026
@andybalaam andybalaam changed the title Call the new recoverAndFixBackup method to fix key storage if it's broken Fix key storage if it's broken Mar 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR-Bugfix For bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants