diff options
| author | mei23 <m@m544.net> | 2018-08-21 13:17:37 +0900 |
|---|---|---|
| committer | mei23 <m@m544.net> | 2018-08-21 13:22:30 +0900 |
| commit | 44955257058b1f42036a693eba51a0d12b96abd5 (patch) | |
| tree | 60a29941d9a1fb5df2732cd29064e977c1ed10f9 /src/server/activitypub.ts | |
| parent | 7.1.2 (diff) | |
| download | misskey-44955257058b1f42036a693eba51a0d12b96abd5.tar.gz misskey-44955257058b1f42036a693eba51a0d12b96abd5.tar.bz2 misskey-44955257058b1f42036a693eba51a0d12b96abd5.zip | |
Respect visibility in ActivityPub Note/Outbox
Diffstat (limited to 'src/server/activitypub.ts')
| -rw-r--r-- | src/server/activitypub.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/server/activitypub.ts b/src/server/activitypub.ts index c2dec2b997..26eaa68fe8 100644 --- a/src/server/activitypub.ts +++ b/src/server/activitypub.ts @@ -54,7 +54,8 @@ router.get('/notes/:note', async (ctx, next) => { if (!isActivityPubReq(ctx)) return await next(); const note = await Note.findOne({ - _id: new mongo.ObjectID(ctx.params.note) + _id: new mongo.ObjectID(ctx.params.note), + $or: [ { visibility: 'public' }, { visibility: 'home' } ] }); if (note === null) { @@ -62,7 +63,7 @@ router.get('/notes/:note', async (ctx, next) => { return; } - ctx.body = pack(await renderNote(note)); + ctx.body = pack(await renderNote(note, false)); }); // outbox |