Skip to content
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

🟢 Apply (polls) push rules client side for encrypted rooms #1714

Merged
merged 6 commits into from
Feb 13, 2023

Conversation

flescio
Copy link
Contributor

@flescio flescio commented Feb 9, 2023

push rules for an event was broken because it was reading the encrypted one.
Now if present the clear event, the proper rule id is matching properly.

It was also missing the pushRulesManager's handle account data in the updateBackgroundServiceStoresIfNeeded, that way it was not synchronised and a reboot of the app was needed in order to fetch the proper push rules

@flescio flescio requested review from alfogrillo and a team February 9, 2023 10:55
@codecov
Copy link

codecov bot commented Feb 9, 2023

Codecov Report

Base: 17.52% // Head: 17.51% // Decreases project coverage by -0.01% ⚠️

Coverage data is based on head (ccecb3f) compared to base (7d59096).
Patch coverage: 0.00% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1714      +/-   ##
===========================================
- Coverage    17.52%   17.51%   -0.01%     
===========================================
  Files          612      612              
  Lines        95983    95988       +5     
  Branches     40286    40289       +3     
===========================================
- Hits         16823    16817       -6     
- Misses       78649    78660      +11     
  Partials       511      511              
Impacted Files Coverage Δ
...xSDK/Background/MXBackgroundPushRulesManager.swift 0.00% <0.00%> (ø)
MatrixSDK/Background/MXBackgroundSyncService.swift 0.00% <0.00%> (ø)
MatrixSDKTests/MXHTTPAdditionalHeadersUnitTests.m 72.34% <0.00%> (-12.77%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@aringenbach aringenbach left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -101,6 +101,9 @@ import Foundation
public func pushRule(matching event: MXEvent,
roomState: MXRoomState,
currentUserDisplayName: String?) -> MXPushRule? {
// getting the uncrypted event if present or fallback
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// getting the uncrypted event if present or fallback
// getting the unencrypted event if present or fallback

Copy link
Contributor

@alfogrillo alfogrillo left a comment

Choose a reason for hiding this comment

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

LGTM!

@flescio flescio merged commit 187c4a1 into develop Feb 13, 2023
@flescio flescio deleted the flescio/apply_poll_push_rules_encrypted-rooms branch February 13, 2023 10:13
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