Skip to content

ffi(bindings): check if MSC 4028 is enabled on the homeserver#2840

Merged
jplatte merged 2 commits intomainfrom
mauroromito/check_if_msc_4028_is_enabled
Nov 15, 2023
Merged

ffi(bindings): check if MSC 4028 is enabled on the homeserver#2840
jplatte merged 2 commits intomainfrom
mauroromito/check_if_msc_4028_is_enabled

Conversation

@Velin92
Copy link
Copy Markdown
Member

@Velin92 Velin92 commented Nov 10, 2023

Added a function that returns true if the current homeserver has the msc 4028 push rule and is enabled.

Since I don't see Ruma having a specific push rule id for it yet, I am using an hardcoded string for now, is that okay?

@Velin92 Velin92 requested a review from jplatte November 10, 2023 15:51
@Velin92 Velin92 requested a review from a team as a code owner November 10, 2023 15:51
@codecov
Copy link
Copy Markdown

codecov bot commented Nov 10, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (5786b1a) 82.33% compared to head (85edfb5) 82.33%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2840      +/-   ##
==========================================
- Coverage   82.33%   82.33%   -0.01%     
==========================================
  Files         211      211              
  Lines       21620    21620              
==========================================
- Hits        17801    17800       -1     
- Misses       3819     3820       +1     

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

better naming

better doc
@jplatte jplatte enabled auto-merge (squash) November 15, 2023 09:18
@jplatte jplatte disabled auto-merge November 15, 2023 09:18
@jplatte jplatte enabled auto-merge (squash) November 15, 2023 09:18
@jplatte jplatte merged commit c24830d into main Nov 15, 2023
@jplatte jplatte deleted the mauroromito/check_if_msc_4028_is_enabled branch November 15, 2023 09:30
@giomfo
Copy link
Copy Markdown
Member

giomfo commented Jan 3, 2024

@Velin92 there is some ambiguity here.
The added function can_homeserver_push_encrypted_event_to_device doesn't check if the MSC4028 is enabled on the homeserver. It actually checks if the rule .m.rule.encrypted_event is present and enabled in the account push rules set.
This is a check at the account data level, not at the homeserver level.
This is true that this check gives you the information you need about the MSC4028 support server side, but it is ambiguous.

The right way to check the support of a feature server side is to used the _matrix/client/versions endpoint. But this MSC4028 is not considered for the moment by this endpoint.
I would be interested to sync with you to improve this, even if this is doing what you need

@giomfo
Copy link
Copy Markdown
Member

giomfo commented Jan 10, 2024

Note: I just added msc4028 to the /_matrix/clients/versions endpoint at the spec level: matrix-org/matrix-spec-proposals@d3a1e87

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