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/remote/activitypub/models/person.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/remote/activitypub') diff --git a/src/remote/activitypub/models/person.ts b/src/remote/activitypub/models/person.ts index a0b951c5f4..1c674729cb 100644 --- a/src/remote/activitypub/models/person.ts +++ b/src/remote/activitypub/models/person.ts @@ -134,7 +134,7 @@ export async function createPerson(uri: string, resolver?: Resolver): Promise tag.toLowerCase()); + const tags = extractHashtags(person.tag).map(tag => tag.toLowerCase()).splice(0, 100); const isBot = object.type == 'Service'; @@ -307,7 +307,7 @@ export async function updatePerson(uri: string, resolver?: Resolver | null, hint const { fields, services } = analyzeAttachments(person.attachment || []); - const tags = extractHashtags(person.tag).map(tag => tag.toLowerCase()); + const tags = extractHashtags(person.tag).map(tag => tag.toLowerCase()).splice(0, 100); const updates = { lastFetchedAt: new Date(), -- cgit v1.2.3-freya