BREAKING server: remove mediaIds parameter

This parameter is a duplicate of fileIds and was marked as deprecated
before. This removes that parameter and therefore simplifies the API
endpoint's schema.

Changelog: Removed
This commit is contained in:
Johann150 2023-04-10 15:07:44 +02:00
parent aa4475ab33
commit 340874c252
Signed by untrusted user: Johann150
GPG key ID: 9EE6577A2A06F8F1

View file

@ -69,15 +69,6 @@ export const paramDef = {
maxItems: 16,
items: { type: 'string', format: 'misskey:id' },
},
mediaIds: {
deprecated: true,
description: 'Use `fileIds` instead. If both are specified, this property is discarded.',
type: 'array',
uniqueItems: true,
minItems: 1,
maxItems: 16,
items: { type: 'string', format: 'misskey:id' },
},
replyId: { type: 'string', format: 'misskey:id', nullable: true },
renoteId: { type: 'string', format: 'misskey:id', nullable: true },
channelId: { type: 'string', format: 'misskey:id', nullable: true },
@ -111,10 +102,6 @@ export const paramDef = {
// (re)note with files, text and poll are optional
required: ['fileIds'],
},
{
// (re)note with files, text and poll are optional
required: ['mediaIds'],
},
{
// (re)note with poll, text and files are optional
properties: {
@ -139,7 +126,7 @@ export default define(meta, paramDef, async (ps, user) => {
}
let files: DriveFile[] = [];
const fileIds = ps.fileIds != null ? ps.fileIds : ps.mediaIds != null ? ps.mediaIds : null;
const fileIds = ps.fileIds != null ? ps.fileIds : null;
if (fileIds != null) {
files = await DriveFiles.createQueryBuilder('file')
.where('file.userId = :userId AND file.id IN (:...fileIds)', {