fix federation of moved to to pleroma

because it expects it to be non-existant if its null.
This commit is contained in:
cutestnekoaqua 2022-12-14 17:19:31 +01:00
parent 5bbf30bc71
commit 8a7da9eaa0
No known key found for this signature in database
GPG Key ID: 6BF0964A5069C1E0
1 changed files with 8 additions and 2 deletions

View File

@ -71,14 +71,20 @@ export async function renderPerson(user: ILocalUser) {
image: banner ? renderImage(banner) : null,
tag,
manuallyApprovesFollowers: user.isLocked,
movedTo: user.movedToUri,
alsoKnownAs: user.alsoKnownAs,
discoverable: !!user.isExplorable,
publicKey: renderKey(user, keypair, '#main-key'),
isCat: user.isCat,
attachment: attachment.length ? attachment : undefined,
} as any;
if (user.movedToUri) {
person.movedTo = user.movedToUri;
}
if (user.alsoKnownAs) {
person.alsoKnownAs = user.alsoKnownAs;
}
if (profile.birthday) {
person['vcard:bday'] = profile.birthday;
}