コメント対応(別チャンネルへのリノート対策)
This commit is contained in:
@@ -253,8 +253,8 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||||||
throw new ApiError(meta.errors.cannotRenoteDueToVisibility);
|
throw new ApiError(meta.errors.cannotRenoteDueToVisibility);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (renote.channelId && !ps.channelId) {
|
if (renote.channelId && renote.channelId !== ps.channelId) {
|
||||||
// チャンネル外へのリノート可否をチェック
|
// チャンネルのノートに対しリノート要求がきたとき、チャンネル外(各TL、別チャンネル)へのリノート可否をチェック
|
||||||
// リノートのユースケースのうち、チャンネル内→チャンネル外は少数だと考えられるため、JOINはせず必要な時に都度取得する
|
// リノートのユースケースのうち、チャンネル内→チャンネル外は少数だと考えられるため、JOINはせず必要な時に都度取得する
|
||||||
const renoteChannel = await this.channelsRepository.findOneById(renote.channelId);
|
const renoteChannel = await this.channelsRepository.findOneById(renote.channelId);
|
||||||
if (renoteChannel == null) {
|
if (renoteChannel == null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user