diff --git a/src/remote/activitypub/renderer/person.ts b/src/remote/activitypub/renderer/person.ts
index 4a6a54881..2c411e544 100644
--- a/src/remote/activitypub/renderer/person.ts
+++ b/src/remote/activitypub/renderer/person.ts
@@ -15,28 +15,37 @@ 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}`
- });
+
+ if (user.twitter) {
+ attachment.push({
+ type: 'PropertyValue',
+ name: 'Twitter',
+ value: `@${user.twitter.screenName}`
+ });
+ }
+
+ if (user.github) {
+ attachment.push({
+ type: 'PropertyValue',
+ name: 'GitHub',
+ value: `@${user.github.login}`
+ });
+ }
+
+ if (user.discord) {
+ attachment.push({
+ type: 'PropertyValue',
+ name: 'Discord',
+ value: `@${user.discord.username}#${user.discord.discriminator}`
+ });
+ }
const emojis = await getEmojis(user.emojis);
const apemojis = emojis.map(emoji => renderEmoji(emoji));