feat: Route to send status broadcast

This commit is contained in:
Davidson Gomes
2023-07-06 16:03:48 -03:00
parent 9604f5c317
commit 4bf4b4a045
3 changed files with 99 additions and 16 deletions

View File

@@ -196,7 +196,9 @@ export const statusMessageSchema: JSONSchema7 = {
statusMessage: {
type: 'object',
properties: {
text: { type: 'string' },
type: { type: 'string', enum: ['text', 'image', 'audio', 'video'] },
content: { type: 'string' },
caption: { type: 'string' },
backgroundColor: { type: 'string' },
font: { type: 'integer', minimum: 0, maximum: 5 },
statusJidList: {
@@ -210,8 +212,8 @@ export const statusMessageSchema: JSONSchema7 = {
},
},
},
required: ['text', 'backgroundColor', 'font', 'statusJidList'],
...isNotEmpty('text', 'backgroundColor', 'font', 'statusJidList'),
required: ['type', 'content', 'statusJidList'],
...isNotEmpty('type', 'content', 'statusJidList'),
},
},
required: ['statusMessage'],