From e0e957c7216b7bd9afe0f029d78003530e754b53 Mon Sep 17 00:00:00 2001 From: Laura Hausmann Date: Tue, 27 Jun 2023 19:19:15 +0200 Subject: [PATCH] Also search for url field when looking for existing note in database --- .../backend/src/remote/activitypub/db-resolver.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/backend/src/remote/activitypub/db-resolver.ts b/packages/backend/src/remote/activitypub/db-resolver.ts index 44ff70c56c..6e448d4b17 100644 --- a/packages/backend/src/remote/activitypub/db-resolver.ts +++ b/packages/backend/src/remote/activitypub/db-resolver.ts @@ -80,8 +80,15 @@ export default class DbResolver { id: parsed.id, }); } else { - return await Notes.findOneBy({ - uri: parsed.uri, + return await Notes.findOne({ + where: [ + { + uri: parsed.uri, + }, + { + url: parsed.uri, + }, + ], }); } }