From 8a7da9eaa051ac5ff6214b110827e90e624446bb Mon Sep 17 00:00:00 2001 From: cutestnekoaqua Date: Wed, 14 Dec 2022 17:19:31 +0100 Subject: [PATCH] fix federation of moved to to pleroma because it expects it to be non-existant if its null. --- .../backend/src/remote/activitypub/renderer/person.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/backend/src/remote/activitypub/renderer/person.ts b/packages/backend/src/remote/activitypub/renderer/person.ts index cd34e0a2e4..4f73d28a6a 100644 --- a/packages/backend/src/remote/activitypub/renderer/person.ts +++ b/packages/backend/src/remote/activitypub/renderer/person.ts @@ -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; }