Skip to content

feat(threads): add methods to list a room's threads + list all related events #4973

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 29, 2025

Conversation

bnjbvr
Copy link
Member

@bnjbvr bnjbvr commented Apr 24, 2025

The tests show how to use them for listing threads (Room::list_threads()), and the events within a thread (Room::relations()).

This should be sufficient to implement an in-memory (viz. not persisted on disk) RoomThreadEventCache 👀 according to the plan described in #4869.

Part of #4869.

@bnjbvr bnjbvr requested a review from a team as a code owner April 24, 2025 14:53
@bnjbvr bnjbvr requested review from poljar and removed request for a team April 24, 2025 14:53
Copy link

codecov bot commented Apr 24, 2025

Codecov Report

Attention: Patch coverage is 68.22430% with 34 lines in your changes missing coverage. Please review.

Project coverage is 85.83%. Comparing base (c3ed8b9) to head (12c280b).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
crates/matrix-sdk/src/test_utils/mocks/mod.rs 55.17% 26 Missing ⚠️
crates/matrix-sdk/src/room/messages.rs 80.00% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4973      +/-   ##
==========================================
- Coverage   85.89%   85.83%   -0.07%     
==========================================
  Files         325      325              
  Lines       35731    35838     +107     
==========================================
+ Hits        30692    30761      +69     
- Misses       5039     5077      +38     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bnjbvr bnjbvr mentioned this pull request Apr 24, 2025
19 tasks
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.

It's a bit strange that the last commit introduces test helpers that were used in the previous commit, there's also a typo in the last commit message.

Overall looks good, I would liked some examples for some of those new methods but alas.

I'm going to fix the typo and commit ordering myself.

@poljar poljar force-pushed the bnjbvr/thread-methods branch from 14c6dcc to 12c280b Compare April 29, 2025 12:46
@poljar poljar enabled auto-merge (rebase) April 29, 2025 12:47
@poljar poljar merged commit ae4cdda into main Apr 29, 2025
41 checks passed
@poljar poljar deleted the bnjbvr/thread-methods branch April 29, 2025 13:01
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.

2 participants