1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-05 06:35:57 +02:00

fix(activitypub): add authorization checks (#8534)

* fix spelling

* fix(activitypub): add authorization checks
This commit is contained in:
Johann150
2022-05-19 13:40:16 +02:00
committed by GitHub
parent 60fd793bc3
commit edfded7fb7
4 changed files with 20 additions and 11 deletions

View File

@@ -27,6 +27,11 @@ export default async (user: { id: User['id']; host: User['host']; }, note: Note,
}
}
// check visibility
if (!await Notes.isVisibleForMe(note, user)) {
throw new IdentifiableError('68e9d2d1-48bf-42c2-b90a-b20e09fd3d48', 'Note not accessible for you.');
}
// TODO: cache
reaction = await toDbReaction(reaction, user.host);