diff --git a/lib/private/Accounts/AccountProperty.php b/lib/private/Accounts/AccountProperty.php index 4b7f2b0c04c2f..896dfd247b5c6 100644 --- a/lib/private/Accounts/AccountProperty.php +++ b/lib/private/Accounts/AccountProperty.php @@ -152,6 +152,7 @@ public static function mapScopeToV2(string $scope): string { switch ($scope) { case IAccountManager::VISIBILITY_PRIVATE: + case '': return IAccountManager::SCOPE_LOCAL; case IAccountManager::VISIBILITY_CONTACTS_ONLY: return IAccountManager::SCOPE_FEDERATED; diff --git a/tests/lib/Accounts/AccountPropertyTest.php b/tests/lib/Accounts/AccountPropertyTest.php index c2ba96ef8a50a..55f83513349c1 100644 --- a/tests/lib/Accounts/AccountPropertyTest.php +++ b/tests/lib/Accounts/AccountPropertyTest.php @@ -84,8 +84,8 @@ public function scopesProvider() { [IAccountManager::VISIBILITY_PRIVATE, IAccountManager::SCOPE_LOCAL], [IAccountManager::VISIBILITY_CONTACTS_ONLY, IAccountManager::SCOPE_FEDERATED], [IAccountManager::VISIBILITY_PUBLIC, IAccountManager::SCOPE_PUBLISHED], + ['', IAccountManager::SCOPE_LOCAL], // invalid values - ['', null], ['unknown', null], ['v2-unknown', null], ];