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

Implement MSC4141: Add time and day push rule condition #16858

Open
wants to merge 11 commits into
base: develop
Choose a base branch
from

Conversation

hanadi92
Copy link
Contributor

@hanadi92 hanadi92 commented Jan 27, 2024

This is an implementation for MSC4141: Time based notification filtering which allows adding a don't disturb interval of time among days of the week as a condition to the master push rule.

p.s. This was an Implementation for MSC3767 Time Based Notification Filtering but it didn't have specs for the day-of-week, therefore, MSC4141 was created.

Pull Request Checklist

  • Pull request is based on the develop branch
  • Pull request includes a changelog file. The entry should:
    • Be a short description of your change which makes sense to users. "Fixed a bug that prevented receiving messages from other servers." instead of "Moved X method from EventStore to EventWorkerStore.".
    • Use markdown where necessary, mostly for code blocks.
    • End with either a period (.) or an exclamation mark (!).
    • Start with a capital letter.
    • Feel free to credit yourself, by adding a sentence "Contributed by @github_username." or "Contributed by [Your Name]." to the end of the entry.
  • Code style is correct
    (run the linters)

Signed-off: Hanadi @hanadi92

@hanadi92 hanadi92 force-pushed the 3767-time-based-notification-filtering branch 5 times, most recently from 050d2bf to 2b70923 Compare January 27, 2024 18:20
@hanadi92 hanadi92 force-pushed the 3767-time-based-notification-filtering branch from 2b70923 to 933e886 Compare January 27, 2024 18:51
@anoadragon453
Copy link
Member

Hi @hanadi92. Thanks for your ongoing work here - nice to see rust contributions in Synapse!

This is just a nudge to ask whether you plan to continue working on this PR? 🙂

@hanadi92
Copy link
Contributor Author

hanadi92 commented Apr 29, 2024

Hi @hanadi92. Thanks for your ongoing work here - nice to see rust contributions in Synapse!

This is just a nudge to ask whether you plan to continue working on this PR? 🙂

Hey @anoadragon453, thanks for the ping.
I would consider my implementation ready for review if it wasn't blocked by a missing (tiny) specification in the spec. Here is the discussion around it matrix-org/matrix-spec-proposals#3767 (comment).

To be honest, I don't know how to proceed here. Please advise 🙂

@anoadragon453
Copy link
Member

@hanadi92 to resolve this situation, I would make a decision on which direction to take regarding the day-of-week specification (0-6, 1-7, 0-7) and then create a new MSC with the modified text (as Kerry has stopped updating that MSC). The SCT will then vote to close to old one. Be sure to link back to the old MSC so people can find the old discussions. Then update this implementation PR with the new MSC number.

As others have said in the linked discussion, I would also advise going for a mapping of 0-6 or 1-7 for the days of the week, rather than having Sunday map to two days. (Otherwise you'll end up having an enum with Sunday and Sunday2 🙃.)

# Conflicts:
#	rust/Cargo.toml
#	synapse/config/experimental.py
@hanadi92 hanadi92 changed the title Implement MSC3767: Add time and day push rule condition Implement MSC4141: Add time and day push rule condition May 8, 2024
@hanadi92 hanadi92 force-pushed the 3767-time-based-notification-filtering branch from 8c9aa73 to fe9f9a8 Compare May 8, 2024 15:34
@hanadi92 hanadi92 marked this pull request as ready for review May 9, 2024 09:28
@hanadi92 hanadi92 requested a review from a team as a code owner May 9, 2024 09:28
Copy link
Member

@erikjohnston erikjohnston left a comment

Choose a reason for hiding this comment

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

I have no concerns with this approach, and happy that if the MSC is accepted we'll be able to implement.

I don't think we'll want to land this before the MSC progresses, but I'm happy that this proves that the MSC is implementable.

@hanadi92
Copy link
Contributor Author

hanadi92 commented May 14, 2024

thanks for the review! @erikjohnston even if we had the default value for this feature as False?
just wondering for client implementation, might need to connect to a server offering this feature.

@CLAassistant
Copy link

CLAassistant commented Oct 14, 2024

CLA assistant check
All committers have signed the CLA.

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.

4 participants