@@ -15,7 +15,6 @@ import type {
15
15
DriveFilesRepository ,
16
16
ChannelsRepository ,
17
17
NoteScheduleRepository ,
18
- MiNoteSchedule ,
19
18
} from '@/models/_.js' ;
20
19
import type { MiDriveFile } from '@/models/DriveFile.js' ;
21
20
import type { MiNote } from '@/models/Note.js' ;
@@ -25,7 +24,6 @@ import { Endpoint } from '@/server/api/endpoint-base.js';
25
24
import { DI } from '@/di-symbols.js' ;
26
25
import { QueueService } from '@/core/QueueService.js' ;
27
26
import { IdService } from '@/core/IdService.js' ;
28
- import { IEvent } from '@/models/Event.js' ;
29
27
import { MiScheduleNoteType } from '@/models/NoteSchedule.js' ;
30
28
import { RoleService } from '@/core/RoleService.js' ;
31
29
import { ApiError } from '../../../error.js' ;
@@ -137,7 +135,6 @@ export const paramDef = {
137
135
noExtractEmojis : { type : 'boolean' , default : false } ,
138
136
replyId : { type : 'string' , format : 'misskey:id' , nullable : true } ,
139
137
renoteId : { type : 'string' , format : 'misskey:id' , nullable : true } ,
140
- channelId : { type : 'string' , format : 'misskey:id' , nullable : true } ,
141
138
142
139
// anyOf内にバリデーションを書いても最初の一つしかチェックされない
143
140
// See https://github.com/misskey-dev/misskey/pull/10082
@@ -295,19 +292,6 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
295
292
// specified / direct noteはreject
296
293
throw new ApiError ( meta . errors . cannotRenoteDueToVisibility ) ;
297
294
}
298
-
299
- if ( renote . channelId && renote . channelId !== ps . channelId ) {
300
- // チャンネルのノートに対しリノート要求がきたとき、チャンネル外へのリノート可否をチェック
301
- // リノートのユースケースのうち、チャンネル内→チャンネル外は少数だと考えられるため、JOINはせず必要な時に都度取得する
302
- const renoteChannel = await this . channelsRepository . findOneById ( renote . channelId ) ;
303
- if ( renoteChannel == null ) {
304
- // リノートしたいノートが書き込まれているチャンネルが無い
305
- throw new ApiError ( meta . errors . noSuchChannel ) ;
306
- } else if ( ! renoteChannel . allowRenoteToExternal ) {
307
- // リノート作成のリクエストだが、対象チャンネルがリノート禁止だった場合
308
- throw new ApiError ( meta . errors . cannotRenoteOutsideOfChannel ) ;
309
- }
310
- }
311
295
}
312
296
313
297
let reply : MiNote | null = null ;
@@ -348,15 +332,6 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
348
332
ps . poll . expiresAt = schedule_expiresAt + ps . poll . expiredAfter ;
349
333
}
350
334
}
351
-
352
- let channel : MiChannel | null = null ;
353
- if ( ps . channelId != null ) {
354
- channel = await this . channelsRepository . findOneBy ( { id : ps . channelId , isArchived : false } ) ;
355
-
356
- if ( channel == null ) {
357
- throw new ApiError ( meta . errors . noSuchChannel ) ;
358
- }
359
- }
360
335
if ( typeof ps . schedule . expiresAt === 'number' ) {
361
336
if ( ps . schedule . expiresAt < Date . now ( ) ) {
362
337
throw new ApiError ( meta . errors . cannotCreateAlreadyExpiredSchedule ) ;
@@ -380,7 +355,6 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
380
355
reactionAcceptance : ps . reactionAcceptance ,
381
356
visibility : ps . visibility ,
382
357
visibleUsers,
383
- channel : channel ?. id ,
384
358
apMentions : ps . noExtractMentions ? [ ] : undefined ,
385
359
apHashtags : ps . noExtractHashtags ? [ ] : undefined ,
386
360
apEmojis : ps . noExtractEmojis ? [ ] : undefined ,
0 commit comments