From bf9da8458cdd915aa2d6d3ca2133c0d43113f49f Mon Sep 17 00:00:00 2001 From: "Acid Chicken (硫酸鶏)" Date: Fri, 27 Sep 2019 05:16:59 +0900 Subject: 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 --- src/server/api/endpoints/i/update.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/server') diff --git a/src/server/api/endpoints/i/update.ts b/src/server/api/endpoints/i/update.ts index 91056f04a7..99f7efbe1c 100644 --- a/src/server/api/endpoints/i/update.ts +++ b/src/server/api/endpoints/i/update.ts @@ -257,7 +257,7 @@ export default define(meta, async (ps, user, app) => { if (newDescription != null) { const tokens = parse(newDescription); emojis = emojis.concat(extractEmojis(tokens!)); - tags = extractHashtags(tokens!).map(tag => tag.toLowerCase()); + tags = extractHashtags(tokens!).map(tag => tag.toLowerCase()).splice(0, 100); } updates.emojis = emojis; -- cgit v1.2.3-freya