-
Notifications
You must be signed in to change notification settings - Fork 730
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
[Poll] Synchronize polls and message push rules after creation (PSG-1137) #8130
[Poll] Synchronize polls and message push rules after creation (PSG-1137) #8130
Conversation
014556d
to
61c3f55
Compare
d55b281
to
0a0ad2d
Compare
61c3f55
to
529f640
Compare
) | ||
else -> emptyList() | ||
} | ||
fun RuleIds.getParentRule(ruleId: String): String? { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be worth adding a comment here to explain what a parent rule is?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I'm also wondering if this should be moved outside of the sdk, this relation between the push rules is mentioned in the MSC but their connection is done at the application side (the clients are not forced to apply this relation, but on the other hand it could also be interesting to share this information at the sdk level... wdyt?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't find any mention of parent rules in the MSC3930. Is that the right place to look?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The term "parent" is not mentioned, I was talking about these references to m.room.message
rule:
In order to have polls behave similar to message events, the following underride push rules are defined. Note that the push rules are mirrored from those available to m.room.message events.
Typically these rules would be kept in sync with the m.room.message rules they are based upon, however there is no requirement to do so. A client's approach might be to only keep them in sync while setting the values, rather than monitoring for changes to push rules.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It sounds like more of a recommendation from the MSC about how the push rules might be related. In a different app, for example one that is based around polls rather than messages, I guess the parent relation might be reversed?
So I'm leaning towards moving this out of the SDK.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're totally right, I moved the extensions to the vector module dcd43d6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the changes!
Kudos, SonarCloud Quality Gate passed! |
Type of change
Content
Add an observer on the push rule updates in the account data and realign the push rules with their parent if needed.
Motivation and context
#8114 introduces the new push rules in the notification settings. The new rules should be aligned with their parent rules as described in the following table:
The purpose of this PR is to verify and fix if necessary the consistency of the new rules with their parent when changes are detected in the account data.
Screenshots / GIFs
Tests
Tested devices
Checklist