fix(server): ノート翻訳時に公開範囲が考慮されていない問題を修正
This commit is contained in:
@ -8,6 +8,7 @@ import config from '@/config/index';
|
||||
import { getAgentByUrl } from '@/misc/fetch';
|
||||
import { URLSearchParams } from 'url';
|
||||
import { fetchMeta } from '@/misc/fetch-meta';
|
||||
import { Notes } from '@/models';
|
||||
|
||||
export const meta = {
|
||||
tags: ['notes'],
|
||||
@ -43,6 +44,10 @@ export default define(meta, async (ps, user) => {
|
||||
throw e;
|
||||
});
|
||||
|
||||
if (!(await Notes.isVisibleForMe(note, user ? user.id : null))) {
|
||||
return 204; // TODO: 良い感じのエラー返す
|
||||
}
|
||||
|
||||
if (note.text == null) {
|
||||
return 204;
|
||||
}
|
||||
|
Reference in New Issue
Block a user