Skip to content

Commit

Permalink
refactor: change name of the policy to course push optout
Browse files Browse the repository at this point in the history
  • Loading branch information
GlugovGrGlib committed Aug 10, 2024
1 parent cdbdd8c commit 01b69e9
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion openedx/core/djangoapps/ace_common/settings/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def plugin_settings(settings): # lint-amnesty, pylint: disable=missing-function

if getattr(settings, 'FIREBASE_APP', None):
settings.ACE_ENABLED_CHANNELS.append(settings.ACE_CHANNEL_DEFAULT_PUSH)
settings.ACE_ENABLED_POLICIES.append('bulk_push_notification_optout')
settings.ACE_ENABLED_POLICIES.append('course_push_notification_optout')

settings.PUSH_NOTIFICATIONS_SETTINGS = {
'CONFIG': 'push_notifications.conf.AppConfig',
Expand Down
2 changes: 1 addition & 1 deletion openedx/core/djangoapps/ace_common/settings/production.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def plugin_settings(settings):
)
if settings.FIREBASE_APP:
settings.ACE_ENABLED_CHANNELS.append(settings.ACE_CHANNEL_DEFAULT_PUSH)
settings.ACE_ENABLED_POLICIES.append('bulk_push_notification_optout')
settings.ACE_ENABLED_POLICIES.append('course_push_notification_optout')

settings.PUSH_NOTIFICATIONS_SETTINGS = {
'CONFIG': 'push_notifications.conf.AppConfig',
Expand Down
2 changes: 1 addition & 1 deletion openedx/core/djangoapps/notifications/policies.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def check(self, message):
"""
Check if the user has opted out of push notifications for the given course.
:param message:
:return:
:return: PolicyResult
"""
course_ids = message.context.get('course_ids', [])
app_label = message.context.get('app_label')
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
],
"openedx.ace.policy": [
"bulk_email_optout = lms.djangoapps.bulk_email.policies:CourseEmailOptout",
"bulk_push_notification_optout = openedx.core.djangoapps.notifications.policies:CoursePushNotificationOptout", # lint-amnesty, pylint: disable=line-too-long
"course_push_notification_optout = openedx.core.djangoapps.notifications.policies:CoursePushNotificationOptout", # lint-amnesty, pylint: disable=line-too-long
],
"openedx.call_to_action": [
"personalized_learner_schedules = openedx.features.personalized_learner_schedules.call_to_action:PersonalizedLearnerScheduleCallToAction" # lint-amnesty, pylint: disable=line-too-long
Expand Down

0 comments on commit 01b69e9

Please sign in to comment.