Skip to content

Commit

Permalink
fix: Disabled WPP.call.rejectCall function for WhatsApp >= 2.2301.5
Browse files Browse the repository at this point in the history
  • Loading branch information
edgardmessias committed Jan 11, 2023
1 parent 2363c09 commit 3398baa
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/whatsapp/functions/sendCallSignalingMsg.ts
Expand Up @@ -14,6 +14,7 @@
* limitations under the License.
*/

import * as webpack from '../../webpack';
import { exportModule } from '../exportModule';

/** @whatsapp 56981
Expand Down Expand Up @@ -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 };
},
});

0 comments on commit 3398baa

Please sign in to comment.