From 607711c8b4f83b41f8c4a86f255546ca9d8fb828 Mon Sep 17 00:00:00 2001 From: Jesse Wierzbinski Date: Tue, 9 Apr 2024 23:41:29 -1000 Subject: [PATCH] Other fix --- database/entities/Status.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/database/entities/Status.ts b/database/entities/Status.ts index 3f80e4b4..e0ce079d 100644 --- a/database/entities/Status.ts +++ b/database/entities/Status.ts @@ -227,9 +227,12 @@ export const parseTextMentions = async (text: string) => { where: { OR: mentionedPeople.map((person) => ({ username: person.split("@")[1], - instance: { - base_url: person.split("@")[2], - }, + instance: + person.split("@").length > 2 + ? { + base_url: person.split("@")[2], + } + : null, })), }, include: userRelations,