mirror of
https://iceshrimp.dev/iceshrimp/iceshrimp
synced 2024-11-25 15:46:06 +09:00
lint fix (#3522)
This commit is contained in:
parent
99742b9c87
commit
33b6347d9b
@ -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: `<a href="https://twitter.com/intent/user?user_id=${user.twitter.userId}" rel="me nofollow noopener" target="_blank"><span>@${user.twitter.screenName}</span></a>`
|
||||
});
|
||||
user.github && attachment.push({
|
||||
type: 'PropertyValue',
|
||||
name: 'GitHub',
|
||||
value: `<a href="https://github.com/${user.github.login}" rel="me nofollow noopener" target="_blank"><span>@${user.github.login}</span></a>`
|
||||
});
|
||||
user.discord && attachment.push({
|
||||
type: 'PropertyValue',
|
||||
name: 'Discord',
|
||||
value: `<a href="https://discordapp.com/users/${user.discord.id}" rel="me nofollow noopener" target="_blank"><span>@${user.discord.username}#${user.discord.discriminator}</span></a>`
|
||||
});
|
||||
|
||||
if (user.twitter) {
|
||||
attachment.push({
|
||||
type: 'PropertyValue',
|
||||
name: 'Twitter',
|
||||
value: `<a href="https://twitter.com/intent/user?user_id=${user.twitter.userId}" rel="me nofollow noopener" target="_blank"><span>@${user.twitter.screenName}</span></a>`
|
||||
});
|
||||
}
|
||||
|
||||
if (user.github) {
|
||||
attachment.push({
|
||||
type: 'PropertyValue',
|
||||
name: 'GitHub',
|
||||
value: `<a href="https://github.com/${user.github.login}" rel="me nofollow noopener" target="_blank"><span>@${user.github.login}</span></a>`
|
||||
});
|
||||
}
|
||||
|
||||
if (user.discord) {
|
||||
attachment.push({
|
||||
type: 'PropertyValue',
|
||||
name: 'Discord',
|
||||
value: `<a href="https://discordapp.com/users/${user.discord.id}" rel="me nofollow noopener" target="_blank"><span>@${user.discord.username}#${user.discord.discriminator}</span></a>`
|
||||
});
|
||||
}
|
||||
|
||||
const emojis = await getEmojis(user.emojis);
|
||||
const apemojis = emojis.map(emoji => renderEmoji(emoji));
|
||||
|
Loading…
Reference in New Issue
Block a user