merge: upstream

This commit is contained in:
Marie 2024-01-15 12:07:35 +01:00
commit 4c1f6be735
No known key found for this signature in database
GPG key ID: 56569BBE47D2C828
132 changed files with 12167 additions and 792 deletions

View file

@ -177,13 +177,32 @@ export const paramDef = {
},
},
// (re)note with text, files and poll are optional
anyOf: [
{ required: ['text'] },
{ required: ['renoteId'] },
{ required: ['fileIds'] },
{ required: ['mediaIds'] },
{ required: ['poll'] },
],
if: {
properties: {
renoteId: {
type: 'null',
},
fileIds: {
type: 'null',
},
mediaIds: {
type: 'null',
},
poll: {
type: 'null',
},
},
},
then: {
properties: {
text: {
type: 'string',
minLength: 1,
pattern: '[^\\s]+',
},
},
required: ['text'],
},
} as const;
@Injectable()