Skip to content

Conversation

@richvdh
Copy link
Member

@richvdh richvdh commented Oct 30, 2025

Add a new method to CryptoStore which allows retrieving all the withheld sessions in a given room.

Unfortunately, for indexeddb, that means a data migration, because currently the withheld sessions are indexed by (session_id, room) rather than (room, session_id).

This is groundwork for element-hq/element-meta#2876.

  • Public API changes documented in changelogs (optional)

@richvdh richvdh requested review from a team as code owners October 30, 2025 19:06
@richvdh richvdh requested review from Hywan and poljar and removed request for a team October 30, 2025 19:06
@codecov
Copy link

codecov bot commented Oct 30, 2025

Codecov Report

❌ Patch coverage is 84.41558% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.54%. Comparing base (ee82861) to head (0faf3ee).
⚠️ Report is 11 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...x-sdk-crypto/src/types/events/room_key_withheld.rs 40.00% 6 Missing ⚠️
crates/matrix-sdk-sqlite/src/crypto_store.rs 76.47% 1 Missing and 3 partials ⚠️
crates/matrix-sdk-crypto/src/store/traits.rs 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5819      +/-   ##
==========================================
- Coverage   88.55%   88.54%   -0.02%     
==========================================
  Files         361      361              
  Lines      101343   101381      +38     
  Branches   101343   101381      +38     
==========================================
+ Hits        89747    89768      +21     
- Misses       7392     7408      +16     
- Partials     4204     4205       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@codspeed-hq
Copy link

codspeed-hq bot commented Oct 30, 2025

CodSpeed Performance Report

Merging #5819 will not alter performance

Comparing rav/cryptostore_withheld_sessions_by_room_id (0faf3ee) with main (ee82861)

Summary

✅ 50 untouched

@richvdh richvdh marked this pull request as draft October 30, 2025 22:42
@richvdh richvdh changed the title <!-- description of the changes in this PR --> crypto: add new CryptoStore method get_withheld_sessions_by_room_id Oct 30, 2025
Implement this across all the store implementations
@richvdh richvdh force-pushed the rav/cryptostore_withheld_sessions_by_room_id branch from a77a2c7 to e50f5ff Compare October 30, 2025 23:10
@richvdh richvdh marked this pull request as ready for review October 31, 2025 00:08
@richvdh richvdh force-pushed the rav/cryptostore_withheld_sessions_by_room_id branch from e50f5ff to 0faf3ee Compare October 31, 2025 12:00
Copy link
Contributor

@poljar poljar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

Comment on lines +1 to +2
CREATE INDEX "direct_withheld_info_room_id_idx"
ON "direct_withheld_info" ("room_id");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reminder to myself, this will be a merge conflict with #5817.

@richvdh richvdh merged commit 9efb0de into main Nov 3, 2025
53 checks passed
@richvdh richvdh deleted the rav/cryptostore_withheld_sessions_by_room_id branch November 3, 2025 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants