Skip to content

Invites room summary fallback #4780

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 5 commits into from
Mar 11, 2025
Merged

Conversation

stefanceriu
Copy link
Member

This PR introduces a fallback mechanism for dealing with invites when the room summary API MSC3266 isn't enabled on the homeserver.
It does so by trying to use whatever data the client has cached about the room, and even though it won't contain a lot of information, it will still provide an usable instance which can be used to accept/decline the invite and partially populate the join room screen (in EX).

It also deals away with the now unnecessary invited_room and inviter and expose a new client one for fetching arbitrary rooms based on their identifier.

@stefanceriu stefanceriu requested a review from a team as a code owner March 10, 2025 17:06
@stefanceriu stefanceriu requested review from andybalaam and bnjbvr and removed request for a team and andybalaam March 10, 2025 17:06
…nt data if fetching the preview fails

- relates to element-hq/element-x-ios/issues/3713
- this will allow us to interact with them even if the given homeserver doesn't have MSC3266 enabled
…ds as those should be retrieved through the room preview
@stefanceriu stefanceriu force-pushed the stefan/invitesRoomSummaryFallback branch from 9168936 to abe8338 Compare March 10, 2025 17:12
Copy link

codecov bot commented Mar 10, 2025

Codecov Report

Attention: Patch coverage is 76.92308% with 3 lines in your changes missing coverage. Please review.

Project coverage is 86.36%. Comparing base (b5c4fe3) to head (ca025f8).
Report is 9 commits behind head on main.

Files with missing lines Patch % Lines
crates/matrix-sdk/src/room_preview.rs 71.42% 2 Missing ⚠️
crates/matrix-sdk/src/test_utils/mocks/mod.rs 83.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4780      +/-   ##
==========================================
+ Coverage   86.34%   86.36%   +0.01%     
==========================================
  Files         291      291              
  Lines       34233    34245      +12     
==========================================
+ Hits        29560    29574      +14     
+ Misses       4673     4671       -2     

☔ 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.

Copy link
Member

@bnjbvr bnjbvr left a comment

Choose a reason for hiding this comment

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

lgtm, thanks1

- we're doing this as an extra layer of protection against spam attacks.
@stefanceriu stefanceriu force-pushed the stefan/invitesRoomSummaryFallback branch from afc5096 to ca025f8 Compare March 11, 2025 08:17
@stefanceriu stefanceriu merged commit ea8664c into main Mar 11, 2025
43 checks passed
@stefanceriu stefanceriu deleted the stefan/invitesRoomSummaryFallback branch March 11, 2025 09:02
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