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;
attachments: AttachmentPayload;
attachment: AttachmentPayload;
};
export enum QuickReplyType {

View File

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

View File

@ -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),

View File

@ -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,