From 05b577983895224586260df07c4477fda4bfb6b9 Mon Sep 17 00:00:00 2001 From: Edgard Date: Sat, 5 Feb 2022 17:17:25 -0300 Subject: [PATCH] feat: Extracted sendCallSignalingMsg function --- src/whatsapp/functions/index.ts | 1 + .../functions/sendCallSignalingMsg.ts | 48 +++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 src/whatsapp/functions/sendCallSignalingMsg.ts diff --git a/src/whatsapp/functions/index.ts b/src/whatsapp/functions/index.ts index b15f30676a..5d7dfd0476 100644 --- a/src/whatsapp/functions/index.ts +++ b/src/whatsapp/functions/index.ts @@ -29,6 +29,7 @@ export * from './msgFindQuery'; export * from './products'; export * from './profilePic'; export * from './randomId'; +export * from './sendCallSignalingMsg'; export * from './sendClear'; export * from './sendCreateGroup'; export * from './sendDelete'; diff --git a/src/whatsapp/functions/sendCallSignalingMsg.ts b/src/whatsapp/functions/sendCallSignalingMsg.ts new file mode 100644 index 0000000000..1ac05453d4 --- /dev/null +++ b/src/whatsapp/functions/sendCallSignalingMsg.ts @@ -0,0 +1,48 @@ +/*! + * Copyright 2021 WPPConnect Team + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { Wid } from '..'; +import { exportModule } from '../exportModule'; +import { ChatModel } from '../models'; + +/** @whatsapp 67935 */ +export declare function sendCallSignalingMsg( + data: { + common: { + type?: string; + call_id?: string; + peer_jid: Wid; + }; + payload: [ + string, + { + 'call-id': string; + 'call-creator': string; + count?: any; + }, + null + ]; + }, + tagId?: string +): Promise; + +exportModule( + exports, + { + sendCallSignalingMsg: 'sendCallSignalingMsg', + }, + (m) => m.sendCallSignalingMsg +);