fix federation of moved to to pleroma
because it expects it to be non-existant if its null.
This commit is contained in:
parent
5bbf30bc71
commit
8a7da9eaa0
1 changed files with 8 additions and 2 deletions
|
@ -71,14 +71,20 @@ export async function renderPerson(user: ILocalUser) {
|
||||||
image: banner ? renderImage(banner) : null,
|
image: banner ? renderImage(banner) : null,
|
||||||
tag,
|
tag,
|
||||||
manuallyApprovesFollowers: user.isLocked,
|
manuallyApprovesFollowers: user.isLocked,
|
||||||
movedTo: user.movedToUri,
|
|
||||||
alsoKnownAs: user.alsoKnownAs,
|
|
||||||
discoverable: !!user.isExplorable,
|
discoverable: !!user.isExplorable,
|
||||||
publicKey: renderKey(user, keypair, '#main-key'),
|
publicKey: renderKey(user, keypair, '#main-key'),
|
||||||
isCat: user.isCat,
|
isCat: user.isCat,
|
||||||
attachment: attachment.length ? attachment : undefined,
|
attachment: attachment.length ? attachment : undefined,
|
||||||
} as any;
|
} as any;
|
||||||
|
|
||||||
|
if (user.movedToUri) {
|
||||||
|
person.movedTo = user.movedToUri;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (user.alsoKnownAs) {
|
||||||
|
person.alsoKnownAs = user.alsoKnownAs;
|
||||||
|
}
|
||||||
|
|
||||||
if (profile.birthday) {
|
if (profile.birthday) {
|
||||||
person['vcard:bday'] = profile.birthday;
|
person['vcard:bday'] = profile.birthday;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue