fix(activitypub): add authorization checks (#8534)
* fix spelling * fix(activitypub): add authorization checks
This commit is contained in:
parent
60fd793bc3
commit
edfded7fb7
4 changed files with 20 additions and 11 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue