Account type relay / fix missing baseurl for own contacts

This commit is contained in:
Michael 2024-01-29 06:28:43 +00:00
parent 9af5abaf0b
commit 9bd8d974b3
5 changed files with 150 additions and 137 deletions

View file

@ -127,6 +127,9 @@ class User
case 'community':
return self::ACCOUNT_TYPE_COMMUNITY;
case 'relay':
return self::ACCOUNT_TYPE_RELAY;
}
return null;
}
@ -477,7 +480,7 @@ class User
// Check for correct url and normalised nurl
$url = DI::baseUrl() . '/profile/' . $owner['nickname'];
$repair = empty($owner['network']) || ($owner['url'] != $url) || ($owner['nurl'] != Strings::normaliseLink($owner['url']));
$repair = empty($owner['baseurl']) || empty($owner['network']) || ($owner['url'] != $url) || ($owner['nurl'] != Strings::normaliseLink($owner['url']));
if (!$repair) {
// Check if "addr" is present and correct