refactor: change name of the policy to course push optout

This commit is contained in:
Glib Glugovskiy
2024-08-10 16:11:53 +03:00
committed by Іван Нєдєльніцев
parent 9d0c45680e
commit 69078f3eed
4 changed files with 4 additions and 4 deletions

View File

@@ -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',

View File

@@ -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',

View File

@@ -16,7 +16,7 @@ class CoursePushNotificationOptout(Policy):
"""
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')