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:
Acid Chicken (硫酸鶏) 2019-09-27 05:16:59 +09:00 committed by syuilo
parent 1832b2e53c
commit bf9da8458c
3 changed files with 4 additions and 4 deletions

View file

@ -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;