summaryrefslogtreecommitdiff
path: root/src/remote/activitypub
diff options
context:
space:
mode:
authorAcid Chicken (硫酸鶏) <root@acid-chicken.com>2019-09-27 05:16:59 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2019-09-27 05:16:59 +0900
commitbf9da8458cdd915aa2d6d3ca2133c0d43113f49f (patch)
tree7d8ee71c676266d2cdc669070554d5028f9ba4c7 /src/remote/activitypub
parentUpdate ja-JP.yml (#5393) (diff)
downloadsharkey-bf9da8458cdd915aa2d6d3ca2133c0d43113f49f.tar.gz
sharkey-bf9da8458cdd915aa2d6d3ca2133c0d43113f49f.tar.bz2
sharkey-bf9da8458cdd915aa2d6d3ca2133c0d43113f49f.zip
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
Diffstat (limited to 'src/remote/activitypub')
-rw-r--r--src/remote/activitypub/models/person.ts4
1 files changed, 2 insertions, 2 deletions
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<Us
const { fields } = 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 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(),