fix: rename payload to ensure consistency

This commit is contained in:
Mohamed Marrouchi 2025-01-17 08:27:43 +01:00
parent 8d1bb47b2a
commit 356b16aa9d
4 changed files with 4 additions and 4 deletions

View File

@ -19,7 +19,7 @@ export type Payload =
} }
| { | {
type: PayloadType.attachments; type: PayloadType.attachments;
attachments: AttachmentPayload; attachment: AttachmentPayload;
}; };
export enum QuickReplyType { export enum QuickReplyType {

View File

@ -389,7 +389,7 @@ describe('BlockService', () => {
const result = blockService.matchPayload( const result = blockService.matchPayload(
{ {
type: PayloadType.attachments, type: PayloadType.attachments,
attachments: { attachment: {
type: FileType.file, type: FileType.file,
payload: { payload: {
id: '9'.repeat(24), id: '9'.repeat(24),

View File

@ -146,7 +146,7 @@ export const webEvents: [string, Web.IncomingMessage, any][] = [
messageType: IncomingMessageType.attachments, messageType: IncomingMessageType.attachments,
payload: { payload: {
type: IncomingMessageType.attachments, type: IncomingMessageType.attachments,
attachments: { attachment: {
type: FileType.image, type: FileType.image,
payload: { payload: {
id: '9'.repeat(24), id: '9'.repeat(24),

View File

@ -225,7 +225,7 @@ export default class WebEventWrapper<
return { return {
type: PayloadType.attachments, type: PayloadType.attachments,
attachments: { attachment: {
type: Attachment.getTypeByMime(this._adapter.raw.data.type), type: Attachment.getTypeByMime(this._adapter.raw.data.type),
payload: { payload: {
id: this._adapter.attachment.id, id: this._adapter.attachment.id,