Limit the tag counts to 100 (#5263)
* Limit the tag counts to 256 * Update create.ts * Update create.ts * Update create.ts * Limit the user tag
This commit is contained in:
committed by
syuilo
parent
1832b2e53c
commit
bf9da8458c
@ -165,7 +165,7 @@ export default async (user: User, data: Option, silent = false) => new Promise<N
|
||||
mentionedUsers = data.apMentions || await extractMentionedUsers(user, combinedTokens);
|
||||
}
|
||||
|
||||
tags = tags.filter(tag => Array.from(tag || '').length <= 128);
|
||||
tags = tags.filter(tag => Array.from(tag || '').length <= 128).splice(0, 100);
|
||||
|
||||
if (data.reply && (user.id !== data.reply.userId) && !mentionedUsers.some(u => u.id === data.reply!.userId)) {
|
||||
mentionedUsers.push(await Users.findOne(data.reply.userId).then(ensure));
|
||||
|
Reference in New Issue
Block a user