From 3398baad0a0d090cf45edc5bf6fab3285639cd5f Mon Sep 17 00:00:00 2001 From: Edgard Date: Tue, 10 Jan 2023 22:22:35 -0300 Subject: [PATCH] fix: Disabled WPP.call.rejectCall function for WhatsApp >= 2.2301.5 --- src/whatsapp/functions/sendCallSignalingMsg.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/whatsapp/functions/sendCallSignalingMsg.ts b/src/whatsapp/functions/sendCallSignalingMsg.ts index d31a573965..a2deb478ed 100644 --- a/src/whatsapp/functions/sendCallSignalingMsg.ts +++ b/src/whatsapp/functions/sendCallSignalingMsg.ts @@ -14,6 +14,7 @@ * limitations under the License. */ +import * as webpack from '../../webpack'; import { exportModule } from '../exportModule'; /** @whatsapp 56981 @@ -46,3 +47,13 @@ exportModule( }, (m) => m.sendCallSignalingMsg ); + +/** + * @todo, create a full fallback based on sendCallSignalingMsg for WhatsApp >= 2.2301.5 + */ +webpack.injectFallbackModule('sendCallSignalingMsg', { + sendCallSignalingMsg: async () => { + console.error('Unsupported for WhatsApp >= 2.2301.5'); + return { payload: null, status: 500 }; + }, +});