Skip to content

Conversation

@ganfra
Copy link
Member

@ganfra ganfra commented Dec 10, 2025

Content

Try to come with a better api for checking room permissions.

Motivation and context

Avoid fetching data too many time in the sdk.

Screenshots / GIFs

No ui change.

Tested devices

  • Physical
  • Emulator
  • OS version(s):

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

@ganfra ganfra added the PR-Misc For other changes label Dec 10, 2025
@ganfra ganfra marked this pull request as ready for review December 10, 2025 11:03
@ganfra ganfra requested a review from a team as a code owner December 10, 2025 11:03
@ganfra ganfra requested review from bmarty and removed request for a team December 10, 2025 11:03
@github-actions
Copy link
Contributor

github-actions bot commented Dec 10, 2025

📱 Scan the QR code below to install the build (arm64 only) for this PR.
QR code
If you can't scan the QR code you can install the build via this link: https://i.diawi.com/sWMVS7

@ganfra ganfra force-pushed the feature/fga/room_permissions_rework branch from 5d2008c to d26f21a Compare December 12, 2025 10:52
@sonarqubecloud
Copy link

@codecov
Copy link

codecov bot commented Dec 12, 2025

Codecov Report

❌ Patch coverage is 79.90196% with 41 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.40%. Comparing base (c5bb18c) to head (d26f21a).

Files with missing lines Patch % Lines
...atrix/impl/room/powerlevels/RustRoomPermissions.kt 0.00% 21 Missing ⚠️
...atrix/test/room/powerlevels/FakeRoomPermissions.kt 75.00% 9 Missing ⚠️
...ies/matrix/api/room/powerlevels/RoomPermissions.kt 64.70% 2 Missing and 4 partials ⚠️
...res/knockrequests/impl/data/KnockRequestsModule.kt 0.00% 2 Missing ⚠️
...android/libraries/matrix/impl/room/RustBaseRoom.kt 0.00% 2 Missing ⚠️
.../features/roomdetails/impl/RoomDetailsPresenter.kt 95.45% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #5879      +/-   ##
===========================================
+ Coverage    81.38%   81.40%   +0.01%     
===========================================
  Files         2479     2484       +5     
  Lines        66200    66210      +10     
  Branches      8431     8414      -17     
===========================================
+ Hits         53876    53897      +21     
  Misses        9221     9221              
+ Partials      3103     3092      -11     

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member

@bmarty bmarty left a comment

Choose a reason for hiding this comment

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

Nice work, thanks!

)
}

private data class Permissions(
Copy link
Member

Choose a reason for hiding this comment

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

Extract to a file and rename to RoomMemberModerationPermissions like the other ones (RoomDetailsEditPermissions for instance)?

@ganfra ganfra enabled auto-merge December 12, 2025 17:09
@ElementBot
Copy link
Collaborator

Messages
📖 This pull request seems relatively large. Please consider splitting it into multiple smaller ones.

Generated by 🚫 dangerJS against 2708e78

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR-Misc For other changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants