Use stringz.length instead of String.length in hashtag length calculation (#5443)
* Use stringz.length instead of String.length * length to 128, ignore combining
This commit is contained in:
parent
53fba9b137
commit
0f2d392b4b
2 changed files with 2 additions and 2 deletions
|
@ -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 => tag.length <= 100);
|
||||
tags = tags.filter(tag => Array.from(tag || '').length <= 128);
|
||||
|
||||
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));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue