diff --git a/docs/developer-setup.md b/docs/developer-setup.md index f32609b1402..60819c0c1a8 100644 --- a/docs/developer-setup.md +++ b/docs/developer-setup.md @@ -175,8 +175,8 @@ The provided `docker-compose.yml` file from `nextcloud-docker-dev` supports spin 6. Enable federation in the admin settings of Nextcloud Talk or alternatively via occ: - ./scripts/occ.sh nextcloud -- config:app:set spreed federation_enabled --value yes - ./scripts/occ.sh nextcloud2 -- config:app:set spreed federation_enabled --value yes + ./scripts/occ.sh nextcloud -- config:app:set spreed federation_enabled --value true --type boolean + ./scripts/occ.sh nextcloud2 -- config:app:set spreed federation_enabled --value true --type boolean ### Rebuild / update Talk after code changes diff --git a/docs/settings.md b/docs/settings.md index edc862f21db..e08bb40d9ce 100644 --- a/docs/settings.md +++ b/docs/settings.md @@ -120,7 +120,7 @@ Legend: | `hide_signaling_warning` | bool | `false` | No | 🖌️ | Flag that allows to suppress the warning that an HPB should be configured | | `conversations_list_style` | string
`two-lines` or `compact` | `two-lines` | No | | Default conversation list style when not overwritten by the user | | `chat_style` | string
`split` or `unified` | `split` | No | | Default chat style when not overwritten by the user | -| `calls_start_without_media` | bool | `false` | No | | Whether participants start with enabled or disabled audio and video by default | +| `calls_start_without_media` | bool | `false` | Yes | | Whether participants start with enabled or disabled audio and video by default | | `breakout_rooms` | bool | `true` | Yes | | Whether or not breakout rooms are allowed (Will only prevent creating new breakout rooms. Existing conversations are not modified.) | | `call_recording` | bool | `true` | Yes | | Enable call recording | | `call_recording_summary` | bool | `true` | No | 🖌️ | Whether call recordings should automatically be summarized when a transcription and summary provider is enabled. | @@ -128,10 +128,10 @@ Legend: | `call_recording_summary_prompt` | string | `''` | No | | Instructions used by LLM to generate Talk call recording summaries | | `sip_bridge_dialout` | bool | `false` | Yes | | SIP dial-out is allowed when a SIP bridge is configured | | `federation_enabled` | bool | `false` | Yes | | 🏗️ *Work in progress:* Whether or not federation with this instance is allowed | -| `federation_incoming_enabled` | string
`1` or `0` | `1` | Yes | | 🏗️ *Work in progress:* Whether users of this instance can be invited to federated conversations | -| `federation_outgoing_enabled` | string
`1` or `0` | `1` | Yes | | 🏗️ *Work in progress:* Whether users of this instance can invite federated users into conversations | -| `federation_only_trusted_servers` | string
`1` or `0` | `0` | Yes | | 🏗️ *Work in progress:* Whether federation should be limited to the list of "Trusted servers" | -| `federation_allowed_groups` | string[] | `[]` | Yes | 🖌️ | List of local group ids that are allowed to use federated features | +| `federation_incoming_enabled` | bool | `true` | Yes | | 🏗️ *Work in progress:* Whether users of this instance can be invited to federated conversations | +| `federation_outgoing_enabled` | bool | `true` | Yes | | 🏗️ *Work in progress:* Whether users of this instance can invite federated users into conversations | +| `federation_only_trusted_servers` | bool | `false` | Yes | | 🏗️ *Work in progress:* Whether federation should be limited to the list of "Trusted servers" | +| `federation_allowed_groups` | array | `[]` | Yes | 🖌️ | List of local group ids that are allowed to use federated features | | `conversations_files` | bool | `true` | No | 🖌️ | Whether the files app integration is enabled allowing to start conversations in the right sidebar | | `conversations_files_public_shares` | bool | `true` | No | 🖌️ | Whether the public share integration is enabled allowing to start conversations in the right sidebar on the public share page (Requires `conversations_files` also to be enabled) | | `delete_one_to_one_conversations` | bool | `false` | No | ️ | Whether one-to-one conversations can be left by either participant or should be deleted when one participant leaves | diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php index 20e4c478604..1da15c4ee40 100644 --- a/lib/AppInfo/Application.php +++ b/lib/AppInfo/Application.php @@ -31,6 +31,7 @@ use OCA\Talk\Collaboration\Reference\TalkReferenceProvider; use OCA\Talk\Collaboration\Resources\ConversationProvider; use OCA\Talk\Collaboration\Resources\Listener as ResourceListener; +use OCA\Talk\Config; use OCA\Talk\ConfigLexicon; use OCA\Talk\Dashboard\TalkWidget; use OCA\Talk\Deck\DeckPluginLoader; @@ -142,6 +143,7 @@ use OCP\AppFramework\Bootstrap\IBootContext; use OCP\AppFramework\Bootstrap\IBootstrap; use OCP\AppFramework\Bootstrap\IRegistrationContext; +use OCP\AppFramework\Services\IAppConfig; use OCP\Calendar\Events\CalendarObjectCreatedEvent; use OCP\Calendar\Events\CalendarObjectUpdatedEvent; use OCP\Collaboration\AutoComplete\AutoCompleteFilterEvent; @@ -158,7 +160,6 @@ use OCP\Group\Events\GroupDeletedEvent; use OCP\Group\Events\UserAddedEvent; use OCP\Group\Events\UserRemovedEvent; -use OCP\IConfig; use OCP\Navigation\Events\LoadAdditionalEntriesEvent; use OCP\OCM\Events\ResourceTypeRegisterEvent; use OCP\Security\CSP\AddContentSecurityPolicyEvent; @@ -440,10 +441,10 @@ public function registerClientLinks(IAppManager $appManager, IManager $settingMa } public function registerCloudFederationProviderManager( - IConfig $config, + IAppConfig $appConfig, ICloudFederationProviderManager $manager, ): void { - if ($config->getAppValue('spreed', 'federation_enabled', 'no') !== 'yes') { + if (!$appConfig->getAppValueBool(Config::FEDERATION_ENABLED)) { return; } diff --git a/lib/Capabilities.php b/lib/Capabilities.php index 8d4fda65650..ec77d2ecf9d 100644 --- a/lib/Capabilities.php +++ b/lib/Capabilities.php @@ -341,7 +341,7 @@ public function getCapabilities(): array { 'enabled' => $user instanceof IUser && $this->talkConfig->isMatrixEnabled(), ], 'previews' => [ - 'max-gif-size' => $this->appConfig->getAppValueInt(Config::MAX_GIF_SIZE, 3145728), + 'max-gif-size' => $this->appConfig->getAppValueInt(Config::MAX_GIF_SIZE), ], 'signaling' => [ 'session-ping-limit' => max(0, $this->appConfig->getAppValueInt(Config::SESSION_PING_LIMIT)), @@ -377,9 +377,9 @@ public function getCapabilities(): array { if ($this->talkConfig->isFederationEnabled() && $this->talkConfig->isFederationEnabledForUserId($user)) { $capabilities['config']['federation'] = [ 'enabled' => true, - 'incoming-enabled' => $this->appConfig->getAppValueBool('federation_incoming_enabled', true), - 'outgoing-enabled' => $this->appConfig->getAppValueBool('federation_outgoing_enabled', true), - 'only-trusted-servers' => $this->appConfig->getAppValueBool('federation_only_trusted_servers'), + 'incoming-enabled' => $this->appConfig->getAppValueBool(Config::FEDERATION_INCOMING_ENABLED), + 'outgoing-enabled' => $this->appConfig->getAppValueBool(Config::FEDERATION_OUTGOING_ENABLED), + 'only-trusted-servers' => $this->appConfig->getAppValueBool(Config::FEDERATION_ONLY_TRUSTED_SERVERS), ]; } @@ -394,8 +394,8 @@ public function getCapabilities(): array { $capabilities['config']['signaling']['hello-v2-token-key'] = $pubKey; } - $includeBrandedBackgrounds = $user instanceof IUser || $this->appConfig->getAppValueBool('backgrounds_branded_for_guests'); - $includeDefaultBackgrounds = !$user instanceof IUser || $this->appConfig->getAppValueBool('backgrounds_default_for_users', true); + $includeBrandedBackgrounds = $user instanceof IUser || $this->appConfig->getAppValueBool(Config::BACKGROUNDS_BRANDED_FOR_GUESTS); + $includeDefaultBackgrounds = !$user instanceof IUser || $this->appConfig->getAppValueBool(Config::BACKGROUNDS_DEFAULT_FOR_USERS); $predefinedBackgrounds = []; $defaultBackgrounds = $this->getBackgroundsFromDirectory(__DIR__ . '/../img/backgrounds', '_default'); @@ -414,7 +414,7 @@ public function getCapabilities(): array { $capabilities['config']['call']['predefined-backgrounds-v2'] = array_values($predefinedBackgrounds); if ($user instanceof IUser) { - $userAllowedToUpload = $this->appConfig->getAppValueBool('backgrounds_upload_users', true); + $userAllowedToUpload = $this->appConfig->getAppValueBool(Config::BACKGROUNDS_UPLOAD_USERS); if ($userAllowedToUpload) { $quota = $user->getQuota(); if ($quota !== 'none') { diff --git a/lib/Config.php b/lib/Config.php index 5f2cb691b94..4ec96fe33ae 100644 --- a/lib/Config.php +++ b/lib/Config.php @@ -47,6 +47,11 @@ class Config { public const string ALLOWED_GROUPS_TALK = 'allowed_groups'; public const string ALLOWED_GROUPS_SIP = 'sip_bridge_groups'; public const string ALLOWED_GROUPS_CONVERSATIONS = 'start_conversations'; + public const string ALLOWED_GROUPS_FEDERATION = 'federation_allowed_groups'; + public const string FEDERATION_ENABLED = 'federation_enabled'; + public const string FEDERATION_INCOMING_ENABLED = 'federation_incoming_enabled'; + public const string FEDERATION_OUTGOING_ENABLED = 'federation_outgoing_enabled'; + public const string FEDERATION_ONLY_TRUSTED_SERVERS = 'federation_only_trusted_servers'; public const string BREAKOUT_ROOMS_ENABLED = 'breakout_rooms'; public const string CONVERSATION_SUBFOLDERS = 'conversation_subfolders'; public const string CONVERSATIONS_FILES = 'conversations_files'; @@ -77,7 +82,7 @@ class Config { public const string RECORDING_SERVERS = 'recording_servers'; public const string FORCE_PASSWORDS = 'force_passwords'; public const string BACKGROUNDS_BRANDED_FOR_GUESTS = 'backgrounds_branded_for_guests'; - public const string BACKGROUNDS_DEFAULT_FOR_USERS = 'backgrounds_default_for_useres'; + public const string BACKGROUNDS_DEFAULT_FOR_USERS = 'backgrounds_default_for_users'; public const string BACKGROUNDS_UPLOAD_USERS = 'backgrounds_upload_users'; public const string CREATE_SAMPLES = 'create_samples'; public const string MATTERBRIDGE_ENABLED = 'enable_matterbridge'; @@ -192,11 +197,11 @@ public function isSIPConfigured(): bool { */ public function isFederationEnabled(): bool { // TODO: Set to default true once implementation is complete - return $this->config->getAppValue('spreed', 'federation_enabled', 'no') === 'yes'; + return $this->appConfig->getAppValueBool(self::FEDERATION_ENABLED); } public function isFederationEnabledForUserId(IUser $user): bool { - $allowedGroups = $this->appConfig->getAppValueArray('federation_allowed_groups', lazy: true); + $allowedGroups = $this->appConfig->getAppValueArray(self::ALLOWED_GROUPS_FEDERATION, lazy: true); if (empty($allowedGroups)) { return true; } diff --git a/lib/ConfigLexicon.php b/lib/ConfigLexicon.php index 82e73f34dc3..964820f6350 100644 --- a/lib/ConfigLexicon.php +++ b/lib/ConfigLexicon.php @@ -155,11 +155,16 @@ public function getAppConfigs(): array { new Entry(Config::ALLOWED_GROUPS_TALK, ValueType::ARRAY, [], definition: 'List of group ids that are allowed to use Talk'), new Entry(Config::ALLOWED_GROUPS_SIP, ValueType::ARRAY, [], definition: 'List of group ids that are allowed to enable SIP dial-in in a conversation'), new Entry(Config::ALLOWED_GROUPS_CONVERSATIONS, ValueType::ARRAY, [], definition: 'List of group ids that are allowed to create conversation'), + new Entry(Config::ALLOWED_GROUPS_FEDERATION, ValueType::ARRAY, [], definition: 'List of local group ids that are allowed to use federated features'), + new Entry(Config::FEDERATION_ENABLED, ValueType::BOOL, false, definition: 'Whether or not federation with this instance is allowed'), + new Entry(Config::FEDERATION_INCOMING_ENABLED, ValueType::BOOL, true, definition: 'Whether users of this instance can be invited to federated conversations'), + new Entry(Config::FEDERATION_OUTGOING_ENABLED, ValueType::BOOL, true, definition: 'Whether users of this instance can invite federated users into conversations'), + new Entry(Config::FEDERATION_ONLY_TRUSTED_SERVERS, ValueType::BOOL, false, definition: 'Whether federation should be limited to the list of "Trusted servers"'), new Entry(Config::BREAKOUT_ROOMS_ENABLED, ValueType::BOOL, true, definition: 'Whether or not breakout rooms are allowed (Will only prevent creating new breakout rooms. Existing conversations are not modified.'), - new Entry(Config::CONVERSATION_SUBFOLDERS, ValueType::BOOL, true, definition: ''), new Entry(Config::CONVERSATIONS_FILES, ValueType::BOOL, true, definition: 'Whether the files app integration is enabled allowing tostart conversations in the right sidebar'), new Entry(Config::CONVERSATIONS_FILES_PUBLIC_SHARES, ValueType::BOOL, true, definition: 'Whether the public share integration is enabled allowing to start conversations in the right sidebar on the public share page (Requires `conversations_files` also to be enabled'), new Entry(Config::DEFAULT_ROOM_PERMISSIONS, ValueType::INT, 246, definition: 'Default permissions for non-moderators' . PHP_EOL . '(see https://github.com/nextcloud/spreed/blob/main/docs/constants.md#attendee-permissions for bit flags)'), + new Entry(Config::CONVERSATION_SUBFOLDERS, ValueType::BOOL, true, definition: ''), new Entry(Config::DEFAULT_ATTACHMENT_FOLDER, ValueType::STRING, '/Talk', definition: 'Specify default attachment folder location'), new Entry(Config::GRID_VIDEOS_LIMIT, ValueType::INT, 19 /* 5*4 - self */, definition: 'Maximum number of videos to show (additional to the own video)'), new Entry(Config::GRID_VIDEOS_LIMIT_ENFORCED, ValueType::BOOL, false, definition: 'Whether the number of grid videos should be enforced'), diff --git a/lib/Controller/RoomController.php b/lib/Controller/RoomController.php index ee26d8ad54a..c23961bdadf 100644 --- a/lib/Controller/RoomController.php +++ b/lib/Controller/RoomController.php @@ -205,9 +205,9 @@ protected function getTalkHashHeader(): array { json_encode($this->appConfig->getAppValueArray(Config::ALLOWED_GROUPS_CONVERSATIONS)), $this->appConfig->getAppValueInt(Config::DEFAULT_ROOM_PERMISSIONS), $this->appConfig->getAppValueBool(Config::BREAKOUT_ROOMS_ENABLED), - $this->config->getAppValue('spreed', 'federation_enabled'), json_encode($this->appConfig->getAppValueArray(Config::ALLOWED_GROUPS_SIP)), $this->appConfig->getAppValueBool(Config::MATTERBRIDGE_ENABLED), + $this->appConfig->getAppValueBool(Config::FEDERATION_ENABLED), $this->appConfig->getAppValueInt(Config::RECORDING_CONSENT), $this->appConfig->getAppValueString(Config::SIP_BRIDGE_DIALIN_INFO), $this->appConfig->getAppValueString(Config::SIP_BRIDGE_SHARED_SECRET), @@ -215,11 +215,11 @@ protected function getTalkHashHeader(): array { $this->appConfig->getAppValueBool(Config::CALL_RECORDING_SUMMARY), $this->config->getAppValue('theming', 'cachebuster', '1'), $this->config->getUserValue($this->userId, 'theming', 'userCacheBuster', '0'), - $this->config->getAppValue('spreed', 'federation_incoming_enabled'), - $this->config->getAppValue('spreed', 'federation_outgoing_enabled'), - $this->config->getAppValue('spreed', 'federation_only_trusted_servers'), - $this->config->getAppValue('spreed', 'federation_allowed_groups', '[]'), $this->appConfig->getAppValueInt(Config::FEATURE_HINTS_HIDDEN), + json_encode($this->appConfig->getAppValueArray(Config::ALLOWED_GROUPS_FEDERATION)), + $this->appConfig->getAppValueBool(Config::FEDERATION_INCOMING_ENABLED), + $this->appConfig->getAppValueBool(Config::FEDERATION_OUTGOING_ENABLED), + $this->appConfig->getAppValueBool(Config::FEDERATION_ONLY_TRUSTED_SERVERS), ]; if ($this->userId !== null) { diff --git a/lib/Federation/RestrictionValidator.php b/lib/Federation/RestrictionValidator.php index 382a16b5a90..6fd517107e3 100644 --- a/lib/Federation/RestrictionValidator.php +++ b/lib/Federation/RestrictionValidator.php @@ -53,7 +53,7 @@ public function isAllowedToInvite( throw new FederationRestrictionException(FederationRestrictionException::REASON_CLOUD_ID); } - if (!$this->appConfig->getAppValueBool('federation_outgoing_enabled', true)) { + if (!$this->appConfig->getAppValueBool('federation_outgoing_enabled')) { $this->logger->debug('Could not share conversation as outgoing federation is disabled'); throw new FederationRestrictionException(FederationRestrictionException::REASON_OUTGOING); } @@ -63,7 +63,7 @@ public function isAllowedToInvite( throw new FederationRestrictionException(FederationRestrictionException::REASON_FEDERATION); } - if ($this->appConfig->getAppValueBool('federation_only_trusted_servers')) { + if ($this->appConfig->getAppValueBool(Config::FEDERATION_ONLY_TRUSTED_SERVERS)) { if (!$this->appManager->isEnabledForUser('federation')) { $this->logger->error('Federation is limited to trusted servers but the "federation" app is disabled'); throw new FederationRestrictionException(FederationRestrictionException::REASON_TRUSTED_SERVERS); diff --git a/lib/Settings/Admin/AdminSettings.php b/lib/Settings/Admin/AdminSettings.php index 86afd759667..2900e7a9fbd 100644 --- a/lib/Settings/Admin/AdminSettings.php +++ b/lib/Settings/Admin/AdminSettings.php @@ -94,11 +94,11 @@ protected function initMatrix(): void { } protected function initFederation(): void { - $this->initialState->provideInitialState('federation_enabled', $this->talkConfig->isFederationEnabled()); - $this->initialState->provideInitialState('federation_incoming_enabled', $this->appConfig->getAppValueBool('federation_incoming_enabled', true)); - $this->initialState->provideInitialState('federation_outgoing_enabled', $this->appConfig->getAppValueBool('federation_outgoing_enabled', true)); - $this->initialState->provideInitialState('federation_only_trusted_servers', $this->appConfig->getAppValueBool('federation_only_trusted_servers')); - $this->initialState->provideInitialState('federation_allowed_groups', $this->getGroupDetailsArray($this->appConfig->getAppValueArray('federation_allowed_groups'), 'federation_allowed_groups')); + $this->initialState->provideInitialState('federation_enabled', $this->appConfig->getAppValueBool(Config::FEDERATION_ENABLED)); + $this->initialState->provideInitialState('federation_incoming_enabled', $this->appConfig->getAppValueBool(Config::FEDERATION_INCOMING_ENABLED)); + $this->initialState->provideInitialState('federation_outgoing_enabled', $this->appConfig->getAppValueBool(Config::FEDERATION_OUTGOING_ENABLED)); + $this->initialState->provideInitialState('federation_only_trusted_servers', $this->appConfig->getAppValueBool(Config::FEDERATION_ONLY_TRUSTED_SERVERS)); + $this->initialState->provideInitialState('federation_allowed_groups', $this->getGroupDetailsArray($this->appConfig->getAppValueArray(Config::ALLOWED_GROUPS_FEDERATION), Config::ALLOWED_GROUPS_FEDERATION)); } protected function initMatterbridge(): void { diff --git a/src/components/AdminSettings/FederationSettings.vue b/src/components/AdminSettings/FederationSettings.vue index 7597fc6cdfa..6b645aa947e 100644 --- a/src/components/AdminSettings/FederationSettings.vue +++ b/src/components/AdminSettings/FederationSettings.vue @@ -54,7 +54,7 @@ onBeforeUnmount(() => { async function saveFederationEnabled(value: boolean) { loading.value = true try { - await setAppConfig('spreed', 'federation_enabled', value ? 'yes' : 'no') + await setAppConfig('spreed', 'federation_enabled', value.toString()) isFederationEnabled.value = value } catch (error) { console.error(error) @@ -72,7 +72,7 @@ async function saveFederationEnabled(value: boolean) { async function saveFederationIncomingEnabled(value: boolean) { loading.value = true try { - await setAppConfig('spreed', 'federation_incoming_enabled', value ? '1' : '0') + await setAppConfig('spreed', 'federation_incoming_enabled', value.toString()) isFederationIncomingEnabled.value = value } catch (error) { console.error(error) @@ -90,7 +90,7 @@ async function saveFederationIncomingEnabled(value: boolean) { async function saveFederationOutgoingEnabled(value: boolean) { loading.value = true try { - await setAppConfig('spreed', 'federation_outgoing_enabled', value ? '1' : '0') + await setAppConfig('spreed', 'federation_outgoing_enabled', value.toString()) isFederationOutgoingEnabled.value = value } catch (error) { console.error(error) @@ -108,7 +108,7 @@ async function saveFederationOutgoingEnabled(value: boolean) { async function saveFederationOnlyTrustedServersEnabled(value: boolean) { loading.value = true try { - await setAppConfig('spreed', 'federation_only_trusted_servers', value ? '1' : '0') + await setAppConfig('spreed', 'federation_only_trusted_servers', value.toString()) isFederationOnlyTrustedServersEnabled.value = value } catch (error) { console.error(error) diff --git a/tests/php/CapabilitiesTest.php b/tests/php/CapabilitiesTest.php index 560e1dfeb31..ddfd7a6b2a7 100644 --- a/tests/php/CapabilitiesTest.php +++ b/tests/php/CapabilitiesTest.php @@ -148,6 +148,20 @@ public function testGetCapabilitiesGuest(): void { ['core', 'backgroundjobs_mode', 'ajax', 'cron'], ]); + $this->appConfig->method('getAppValueBool') + ->willReturnMap([ + ['enable_matterbridge', false], + ['sip_bridge_dialout', false], + ['sip_bridge_dialout_anonymous', false], + ['federation_enabled', false], + ['federation_incoming_enabled', true], + ['federation_outgoing_enabled', true], + ['federation_only_trusted_servers', false], + ['backgrounds_branded_for_guests', false], + ['backgrounds_default_for_users', true], + ['backgrounds_upload_users', true], + ]); + $this->appConfig->method('getAppValueInt') ->willReturnMap([ ['max_call_duration', 0], @@ -155,11 +169,10 @@ public function testGetCapabilitiesGuest(): void { ['retention_phone_rooms', 7], ['retention_instant_meetings', 1], ['retention_classified_rooms', 3600], - ['experiments_guests', 0, 0], + ['experiments_guests', 0], ['summary_threshold', 100], - ['feature_hints_hidden', 0, 999], ['feature_hints_hidden', 999], - ['max_gif_size', 3145728, 200000], + ['max_gif_size', 200000], ['start_calls', Room::START_CALL_EVERYONE], ['session_ping_limit', 200], ]); @@ -383,19 +396,28 @@ public function testGetCapabilitiesUserAllowed(bool $isNotAllowed, bool $canCrea ['backgrounds_upload_users', true, true], ['sip_bridge_dialout', false], ['sip_bridge_dialout_anonymous', false], + ['enable_matterbridge', false], + ['federation_enabled', false], + ['federation_incoming_enabled', true], + ['federation_outgoing_enabled', true], + ['federation_only_trusted_servers', false], + ['backgrounds_branded_for_guests', false], + ['backgrounds_default_for_users', true], + ['backgrounds_upload_users', true], ]); - $this->appConfig->expects($this->any())->method('getAppValueInt') + $this->appConfig->expects($this->any()) + ->method('getAppValueInt') ->willReturnMap([ ['max_call_duration', 0], ['retention_event_rooms', 28], ['retention_phone_rooms', 7], ['retention_instant_meetings', 1], ['retention_classified_rooms', 3600], - ['experiments_users', 0, 0], + ['experiments_users', 0], ['summary_threshold', 100], ['feature_hints_hidden', 1], - ['max_gif_size', 3145728, 200000], + ['max_gif_size', 200000], ['start_calls', Room::START_CALL_NOONE], ['session_ping_limit', 50], ]); diff --git a/tests/php/Federation/FederationTest.php b/tests/php/Federation/FederationTest.php index ef446a1d855..1c561840566 100644 --- a/tests/php/Federation/FederationTest.php +++ b/tests/php/Federation/FederationTest.php @@ -234,7 +234,8 @@ public function testSendRemoteShareWithOwner(): void { $this->appConfig->method('getAppValueBool') ->willReturnMap([ - ['federation_outgoing_enabled', true, false, true], + ['federation_incoming_enabled', true, false, false], + ['federation_outgoing_enabled', true, false, false], ['federation_only_trusted_servers', false, false, false], ]); diff --git a/tests/php/Federation/RestrictionValidatorTest.php b/tests/php/Federation/RestrictionValidatorTest.php index dca2b88c05e..874b59830e8 100644 --- a/tests/php/Federation/RestrictionValidatorTest.php +++ b/tests/php/Federation/RestrictionValidatorTest.php @@ -79,8 +79,8 @@ public function testIsAllowedToInviteAllowsRegularRoom(): void { $room->method('isClassified')->willReturn(false); $this->appConfig->method('getAppValueBool')->willReturnMap([ - ['federation_outgoing_enabled', true, false, true], - ['federation_only_trusted_servers', false, false, false], + ['federation_outgoing_enabled', true], + ['federation_only_trusted_servers', false], ]); $this->talkConfig->method('isFederationEnabledForUserId')->willReturn(true); @@ -96,8 +96,8 @@ public function testIsAllowedToInviteAllowsRegularRoom(): void { public function testIsAllowedToInviteWithoutRoomIsUnaffected(): void { $this->appConfig->method('getAppValueBool')->willReturnMap([ - ['federation_outgoing_enabled', true, false, true], - ['federation_only_trusted_servers', false, false, false], + ['federation_outgoing_enabled', true], + ['federation_only_trusted_servers', false], ]); $this->talkConfig->method('isFederationEnabledForUserId')->willReturn(true);