From 3d6393eda22287f95820fe2418330e15bb3a1376 Mon Sep 17 00:00:00 2001 From: Sven Sauleau Date: Mon, 13 Feb 2023 15:58:02 +0000 Subject: [PATCH] hotfix: only insert hashtags when provided --- functions/api/v1/statuses.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/functions/api/v1/statuses.ts b/functions/api/v1/statuses.ts index 28d6846..75da97b 100644 --- a/functions/api/v1/statuses.ts +++ b/functions/api/v1/statuses.ts @@ -115,7 +115,9 @@ export async function handleRequest( const note = await createStatus(domain, db, connectedActor, content, mediaAttachments, extraProperties) - await insertHashtags(db, note, hashtags) + if (hashtags.length > 0) { + await insertHashtags(db, note, hashtags) + } if (inReplyToObject !== null) { // after the status has been created, record the reply.