diff --git a/src/remote/activitypub/renderer/person.ts b/src/remote/activitypub/renderer/person.ts
index 52485e6959..f02710aad0 100644
--- a/src/remote/activitypub/renderer/person.ts
+++ b/src/remote/activitypub/renderer/person.ts
@@ -13,6 +13,28 @@ export default async (user: ILocalUser) => {
DriveFile.findOne({ _id: user.avatarId }),
DriveFile.findOne({ _id: user.bannerId })
]);
+
+ const attachment: {
+ type: string,
+ name: string,
+ value: string,
+ verified_at?: string
+ }[] = [];
+ user.twitter && attachment.push({
+ type: 'PropertyValue',
+ name: 'Twitter',
+ value: `@${user.twitter.screenName}`
+ });
+ user.github && attachment.push({
+ type: 'PropertyValue',
+ name: 'GitHub',
+ value: `@${user.github.login}`
+ });
+ user.discord && attachment.push({
+ type: 'PropertyValue',
+ name: 'Discord',
+ value: `@${user.discord.username}#${user.discord.discriminator}`
+ });
return {
type: user.isBot ? 'Service' : 'Person',
@@ -31,6 +53,7 @@ export default async (user: ILocalUser) => {
image: user.bannerId && renderImage(banner),
manuallyApprovesFollowers: user.isLocked,
publicKey: renderKey(user),
- isCat: user.isCat
+ isCat: user.isCat,
+ attachment: attachment.length ? attachment : undefined
};
};