Adapt to new DM definition changes in the SDK#6748
Open
jmartinesp wants to merge 7 commits intodevelopfrom
Open
Adapt to new DM definition changes in the SDK#6748jmartinesp wants to merge 7 commits intodevelopfrom
jmartinesp wants to merge 7 commits intodevelopfrom
Conversation
Contributor
|
📱 Scan the QR code below to install the build (arm64 only) for this PR. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #6748 +/- ##
========================================
Coverage 81.22% 81.22%
========================================
Files 2634 2633 -1
Lines 73469 73488 +19
Branches 9496 9495 -1
========================================
+ Hits 59676 59694 +18
Misses 10301 10301
- Partials 3492 3493 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
|
I swapped out my patches for this and it seems to work perfectly. |
This applies the 'direct and with at most 2 non-service members' rule to what the SDK should consider a DM.
…ant. Move `Room.isDm` helper function to `BaseRoom`.
…t normal members of a room from service members (i.e. `RoomMembersState.getDirectRoomMember`)
17d5590 to
269b4f3
Compare
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Content
These changes try to centralise every check about whether a room is a DM or not using the new SDK APIs.
ClientBuilder.dmRoomDefinition(DmRoomDefinition.TwoPeople), which makes the SDK consider a DM a room with 1 direct target and at most two non-service members in it.RoomMember.isServiceMemberto tell apart normal room member and service/functional ones.Room.isDmas a shortcut toRoom.roomInfoFlow.value.isDm, remove all otherisDmimplementations so only the SDK one is valid.isDirectchecks withisDmwhere possible forRoom,SpaceRoom,RoomInfo, etc.Motivation and context
Centralises how the DM checks are done.
Fixes #6717.
Also fixes #4034, since the previous issue is a task that implements the needed changes.
Screenshots / GIFs
No screenshot changes, since just the internal checks changed.
Tests
Tested devices
Checklist