From 40eb9bfd0cc2e27550c4fd152e5fc0d182b192ea Mon Sep 17 00:00:00 2001 From: Edgard Date: Sat, 4 Mar 2023 18:26:03 -0300 Subject: [PATCH] feat: Exported setPushname function --- src/whatsapp/functions/index.ts | 1 + src/whatsapp/functions/setPushname.ts | 30 +++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 src/whatsapp/functions/setPushname.ts diff --git a/src/whatsapp/functions/index.ts b/src/whatsapp/functions/index.ts index f173c6a54b..2ac4eeeb25 100644 --- a/src/whatsapp/functions/index.ts +++ b/src/whatsapp/functions/index.ts @@ -77,6 +77,7 @@ export * from './sendTextMsgToChat'; export * from './setArchive'; export * from './setGroup'; export * from './setPin'; +export * from './setPushname'; export * from './status'; export * from './typeAttributeFromProtobuf'; export * from './unixTime'; diff --git a/src/whatsapp/functions/setPushname.ts b/src/whatsapp/functions/setPushname.ts new file mode 100644 index 0000000000..b40a04edd2 --- /dev/null +++ b/src/whatsapp/functions/setPushname.ts @@ -0,0 +1,30 @@ +/*! + * Copyright 2023 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 { exportModule } from '../exportModule'; + +/** + * @whatsapp 135963 >= 2.2310.5 + */ +export declare function setPushname(name: string): Promise; + +exportModule( + exports, + { + setPushname: 'setPushname', + }, + (m) => m.setPushname && !m.setBrowserId +);