diff --git a/src/chatfuel/controller.ts b/src/chatfuel/controller.ts index a2efafce..c1be9185 100644 --- a/src/chatfuel/controller.ts +++ b/src/chatfuel/controller.ts @@ -43,7 +43,7 @@ const init = async app => { const body = req.body; - const messages: Array<{ attachment?: { type: string; payload: { url: string } }; text?: string }> = [ + const messages: { attachment?: { type: string; payload: { url: string } }; text?: string }[] = [ { text: body.content }, ]; diff --git a/src/facebook/types.ts b/src/facebook/types.ts index e60b8782..981e22f5 100644 --- a/src/facebook/types.ts +++ b/src/facebook/types.ts @@ -34,10 +34,10 @@ export interface IChannelData { recipient: { id: string }; timestamp: number; text?: string; - attachments?: Array<{ + attachments?: { type: string; payload: { url: string }; - }>; + }[]; message: { mid: string; };