-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
feat(notifications-v2): Read from notification settings for weekly reports #56621
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #56621 +/- ##
==========================================
- Coverage 78.63% 78.63% -0.01%
==========================================
Files 5083 5084 +1
Lines 219150 219178 +28
Branches 37102 37113 +11
==========================================
+ Hits 172336 172343 +7
- Misses 41230 41252 +22
+ Partials 5584 5583 -1
|
@@ -553,3 +553,30 @@ def get_notification_provider_value_for_recipient_and_type( | |||
return value | |||
|
|||
return NotificationSettingsOptionEnum.NEVER | |||
|
|||
def get_users_for_weekly_reports(self) -> list[int]: |
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.
@snigdhas Seems like we can use a combination of get_notification_value_for_recipient_and_type
and get_notification_provider_value_for_recipient_and_type
to make this logic super simple, right?
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.
We could, but we'd end up calling self._get_layered_setting_options
N times for N users, and each call would do iterate over the entire dict. We could store the layered settings in memory instead of computing it but I'm not sure that's necessary
…ports (#56621) Read from the new notifications tables for weekly reports instead of user options.
Read from the new notifications tables for weekly reports instead of user options.