Merge pull request #30588 from nextcloud/bugfix/noid/fix-unset-scopes

pull/30612/head
Pytal 2022-01-11 10:12:11 +07:00 committed by GitHub
commit 2bc0749cb6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

@ -152,6 +152,7 @@ class AccountProperty implements IAccountProperty {
switch ($scope) {
case IAccountManager::VISIBILITY_PRIVATE:
case '':
return IAccountManager::SCOPE_LOCAL;
case IAccountManager::VISIBILITY_CONTACTS_ONLY:
return IAccountManager::SCOPE_FEDERATED;

@ -84,8 +84,8 @@ class AccountPropertyTest extends TestCase {
[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],
];