diff --git a/docs/settings.md b/docs/settings.md index 0f03c54d90..634196dbea 100644 --- a/docs/settings.md +++ b/docs/settings.md @@ -97,7 +97,7 @@ Legend: | `max-gif-size` | int | `3145728` | No | | Maximum file size for clients to render gifs previews with animation | | `session-ping-limit` | int | `200` | No | | Number of sessions the HPB can ping in a single request | | `token_entropy` | int | `8` | No | | Length of conversation tokens, can be increased to make tokens harder to guess but reduces readability and dial-in comfort | -| `default_group_notification` | int | `2` | No | 🖌️ | Default notification level for group conversations [constants list](constants.md#participant-notification-levels) | +| `default_group_notification` | int | `1` | No | 🖌️ | Default notification level for group conversations [constants list](constants.md#participant-notification-levels) (Default changed from 2 (mentions) to 1 (always) in Nextcloud 33 for new installations) | | `default_permissions` | int | `246` | Yes | | Default permissions for non-moderators (see [constants list](constants.md#attendee-permissions) for bit flags) | | `recording_consent` | int | `0` | Yes | 🖌️ | Whether users have to agree on being recorded before they can join the call (see [constants](constants.md#recording-consent-required)) | | `grid_videos_limit` | int | `19` | No | | Maximum number of videos to show (additional to the own video) | diff --git a/lib/Chat/Notifier.php b/lib/Chat/Notifier.php index 0bd3ff3f82..30f35f3b93 100644 --- a/lib/Chat/Notifier.php +++ b/lib/Chat/Notifier.php @@ -658,7 +658,7 @@ class Notifier { } protected function getDefaultGroupNotification(): int { - return (int)$this->config->getAppValue('spreed', 'default_group_notification', (string)Participant::NOTIFY_MENTION); + return (int)$this->config->getAppValue('spreed', 'default_group_notification', (string)Participant::NOTIFY_ALWAYS); } /** diff --git a/lib/Migration/Version23000Date20251114105144.php b/lib/Migration/Version23000Date20251114105144.php new file mode 100644 index 0000000000..5ff68d1efc --- /dev/null +++ b/lib/Migration/Version23000Date20251114105144.php @@ -0,0 +1,39 @@ +appConfig->getAppValueInt('default_group_notification', Participant::NOTIFY_DEFAULT); + if ($previous === Participant::NOTIFY_DEFAULT) { + $this->appConfig->setAppValueInt( + 'default_group_notification', + Participant::NOTIFY_MENTION, + ); + } + } +} diff --git a/lib/Notification/FederationChatNotifier.php b/lib/Notification/FederationChatNotifier.php index 2db7077013..0553bd88bf 100644 --- a/lib/Notification/FederationChatNotifier.php +++ b/lib/Notification/FederationChatNotifier.php @@ -74,7 +74,7 @@ class FederationChatNotifier { } // Also notify default participants in one-to-one chats or when the admin default is "always" - $defaultLevel = $this->appConfig->getAppValueInt('default_group_notification', Participant::NOTIFY_MENTION); + $defaultLevel = $this->appConfig->getAppValueInt('default_group_notification', Participant::NOTIFY_ALWAYS); if ($notificationLevel === Participant::NOTIFY_MENTION || ($defaultLevel !== Participant::NOTIFY_NEVER && $notificationLevel === Participant::NOTIFY_DEFAULT)) { if ($this->isRepliedTo($room, $participant, $metaData)) { diff --git a/lib/Service/RoomFormatter.php b/lib/Service/RoomFormatter.php index ebfb32e543..1868e9c826 100644 --- a/lib/Service/RoomFormatter.php +++ b/lib/Service/RoomFormatter.php @@ -288,7 +288,7 @@ class RoomFormatter { } else { $adminSetting = (int)$this->serverConfig->getAppValue('spreed', 'default_group_notification', (string)Participant::NOTIFY_DEFAULT); if ($adminSetting === Participant::NOTIFY_DEFAULT) { - $roomData['notificationLevel'] = Participant::NOTIFY_MENTION; + $roomData['notificationLevel'] = Participant::NOTIFY_ALWAYS; } else { $roomData['notificationLevel'] = $adminSetting; } diff --git a/lib/Settings/Admin/AdminSettings.php b/lib/Settings/Admin/AdminSettings.php index 36675872d9..2ebe222a73 100644 --- a/lib/Settings/Admin/AdminSettings.php +++ b/lib/Settings/Admin/AdminSettings.php @@ -71,7 +71,7 @@ class AdminSettings implements ISettings { } protected function initGeneralSettings(): void { - $this->initialState->provideInitialState('default_group_notification', (int)$this->serverConfig->getAppValue('spreed', 'default_group_notification', (string)Participant::NOTIFY_MENTION)); + $this->initialState->provideInitialState('default_group_notification', (int)$this->serverConfig->getAppValue('spreed', 'default_group_notification', (string)Participant::NOTIFY_ALWAYS)); $this->initialState->provideInitialState('conversations_files', (int)$this->serverConfig->getAppValue('spreed', 'conversations_files', '1')); $this->initialState->provideInitialState('conversations_files_public_shares', (int)$this->serverConfig->getAppValue('spreed', 'conversations_files_public_shares', '1')); $this->initialState->provideInitialState('valid_apache_php_configuration', $this->validApachePHPConfiguration()); diff --git a/tests/integration/run.sh b/tests/integration/run.sh index f03cfe92ff..4a4028ec2f 100755 --- a/tests/integration/run.sh +++ b/tests/integration/run.sh @@ -172,6 +172,8 @@ for OCC in occ_host occ_remote; do ${OCC} config:system:set debug --value true --type bool # Use faster password hashing ${OCC} config:system:set hashing_default_password --value=true --type=bool + # Change the default group notification level for more variate in default tests + ${OCC} config:app:set spreed default_group_notification --value=2 --type=integer # Build skip list MAJOR_VERSION=$(${OCC} status | grep -Eo 'version: ([0-9]+).' | grep -Eo '[0-9]+')