diff --git a/api/src/chat/schemas/types/quick-reply.ts b/api/src/chat/schemas/types/quick-reply.ts index 18ae2b37..29ef17cd 100644 --- a/api/src/chat/schemas/types/quick-reply.ts +++ b/api/src/chat/schemas/types/quick-reply.ts @@ -19,7 +19,7 @@ export type Payload = } | { type: PayloadType.attachments; - attachments: AttachmentPayload; + attachment: AttachmentPayload; }; export enum QuickReplyType { diff --git a/api/src/chat/services/block.service.spec.ts b/api/src/chat/services/block.service.spec.ts index cf436248..fc489a26 100644 --- a/api/src/chat/services/block.service.spec.ts +++ b/api/src/chat/services/block.service.spec.ts @@ -389,7 +389,7 @@ describe('BlockService', () => { const result = blockService.matchPayload( { type: PayloadType.attachments, - attachments: { + attachment: { type: FileType.file, payload: { id: '9'.repeat(24), diff --git a/api/src/extensions/channels/web/__test__/events.mock.ts b/api/src/extensions/channels/web/__test__/events.mock.ts index 1c85ac63..4ffc80fb 100644 --- a/api/src/extensions/channels/web/__test__/events.mock.ts +++ b/api/src/extensions/channels/web/__test__/events.mock.ts @@ -146,7 +146,7 @@ export const webEvents: [string, Web.IncomingMessage, any][] = [ messageType: IncomingMessageType.attachments, payload: { type: IncomingMessageType.attachments, - attachments: { + attachment: { type: FileType.image, payload: { id: '9'.repeat(24), diff --git a/api/src/extensions/channels/web/wrapper.ts b/api/src/extensions/channels/web/wrapper.ts index e576c7d6..decb9301 100644 --- a/api/src/extensions/channels/web/wrapper.ts +++ b/api/src/extensions/channels/web/wrapper.ts @@ -225,7 +225,7 @@ export default class WebEventWrapper< return { type: PayloadType.attachments, - attachments: { + attachment: { type: Attachment.getTypeByMime(this._adapter.raw.data.type), payload: { id: this._adapter.attachment.id,