Skip to content

Commit

Permalink
Corrige tipo de mídia não suportado ao enviar mensagens de mídia - Fixes
Browse files Browse the repository at this point in the history
 #129

Adiciona suporte para envio de mensagens de mídia do tipo 'sticker'.

- Atualiza a validação de tipo de mídia para incluir 'sticker'.
- Adiciona testes para verificar o envio de mensagens de mídia do tipo 'sticker'.
  • Loading branch information
jrCleber committed May 31, 2024
1 parent 3800cbb commit bcf70d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/validate/validate.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export const mediaMessageSchema: JSONSchema7 = {
mediaMessage: {
type: 'object',
properties: {
mediatype: { type: 'string', enum: ['image', 'document', 'video', 'audio'] },
mediatype: { type: 'string', enum: ['image', 'document', 'video', 'audio', 'sticker'] },
media: { type: 'string' },
fileName: { type: 'string' },
caption: { type: 'string' },
Expand All @@ -153,7 +153,7 @@ export const mediaFileMessageSchema: JSONSchema7 = {
properties: {
number: { ...numberDefinition },
caption: { type: 'string' },
mediatype: { type: 'string', enum: ['image', 'document', 'video', 'audio'] },
mediatype: { type: 'string', enum: ['image', 'document', 'video', 'audio', 'sticker'] },
presence: { type: 'string', enum: ['composing', 'recording'] },
delay: { type: 'string' },
},
Expand Down

0 comments on commit bcf70d2

Please sign in to comment.