From 042b2cf7e8478d8006a671b5e7bd454563c71cdd Mon Sep 17 00:00:00 2001 From: Paulo Bernardo Date: Fri, 14 Apr 2023 16:24:18 -0300 Subject: [PATCH] feat: remove attachment type check --- src/remote/livechat/RapidProWebhook.ts | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/remote/livechat/RapidProWebhook.ts b/src/remote/livechat/RapidProWebhook.ts index 52f2595..1d4bc86 100644 --- a/src/remote/livechat/RapidProWebhook.ts +++ b/src/remote/livechat/RapidProWebhook.ts @@ -40,17 +40,8 @@ export default class RapidProWebhook implements ILivechatWebhook { const url = AttachmentUtils.getUrl(serverUrl, attachment); let type = AttachmentUtils.getType(attachment); - if (type === 'document') { - if (url.endsWith('.pdf')) { - type += '/pdf'; - attachmentsPayload.push({type, url}); - } - } else { - attachmentsPayload.push({type, url}); - } - if (attachmentsPayload.length === 0) { - return; - } + attachmentsPayload.push({type, url}); + payload.data['attachments'] = attachmentsPayload; }); }