From 6b109c7b0fc701ab626df0401c46de1629573f84 Mon Sep 17 00:00:00 2001 From: Johann150 Date: Tue, 24 May 2022 10:12:42 +0200 Subject: [PATCH] fix: wrong type for isVisibleForMe --- packages/backend/src/remote/activitypub/kernel/announce/note.ts | 2 +- packages/backend/src/services/note/reaction/create.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/backend/src/remote/activitypub/kernel/announce/note.ts b/packages/backend/src/remote/activitypub/kernel/announce/note.ts index 052751c65..759cb4ae8 100644 --- a/packages/backend/src/remote/activitypub/kernel/announce/note.ts +++ b/packages/backend/src/remote/activitypub/kernel/announce/note.ts @@ -53,7 +53,7 @@ export default async function(resolver: Resolver, actor: CacheableRemoteUser, ac throw e; } - if (!await Notes.isVisibleForMe(renote, actor)) return 'skip: invalid actor for this activity'; + if (!await Notes.isVisibleForMe(renote, actor.id)) return 'skip: invalid actor for this activity'; logger.info(`Creating the (Re)Note: ${uri}`); diff --git a/packages/backend/src/services/note/reaction/create.ts b/packages/backend/src/services/note/reaction/create.ts index 5cb7ebdcd..83d302826 100644 --- a/packages/backend/src/services/note/reaction/create.ts +++ b/packages/backend/src/services/note/reaction/create.ts @@ -28,7 +28,7 @@ export default async (user: { id: User['id']; host: User['host']; }, note: Note, } // check visibility - if (!await Notes.isVisibleForMe(note, user)) { + if (!await Notes.isVisibleForMe(note, user.id)) { throw new IdentifiableError('68e9d2d1-48bf-42c2-b90a-b20e09fd3d48', 'Note not accessible for you.'); }