From a337048f0bdbc2012d55e0afe38762b3ff8fd783 Mon Sep 17 00:00:00 2001 From: Yuriy Bakhtin Date: Fri, 22 Jan 2021 11:53:43 +0300 Subject: [PATCH] Always enable Space Membership Web Notifications (#4789) --- CHANGELOG_DEV.md | 1 + .../notifications/SpaceMemberNotificationCategory.php | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/CHANGELOG_DEV.md b/CHANGELOG_DEV.md index e055f8c527..2e970617a0 100644 --- a/CHANGELOG_DEV.md +++ b/CHANGELOG_DEV.md @@ -33,3 +33,4 @@ - Enh #4781: Change allowed characters in username - Enh #4416: Added replay to sub comments - Enh #4571: humhub/libs/Html::containerLink() now adds a "data-guid" attribute +- Enh #4787: Always enable Space Membership Web Notifications diff --git a/protected/humhub/modules/space/notifications/SpaceMemberNotificationCategory.php b/protected/humhub/modules/space/notifications/SpaceMemberNotificationCategory.php index cc9435b531..31040b4247 100644 --- a/protected/humhub/modules/space/notifications/SpaceMemberNotificationCategory.php +++ b/protected/humhub/modules/space/notifications/SpaceMemberNotificationCategory.php @@ -63,4 +63,15 @@ class SpaceMemberNotificationCategory extends NotificationCategory return $target->defaultSetting; } } + + /** + * @inheritdoc + */ + public function getFixedSettings() + { + $webTarget = Yii::createObject(WebTarget::class); + return [ + $webTarget->id, + ]; + } }