Socket
Socket
Sign inDemoInstall

@juzi/whatsapp-web.js

Package Overview
Dependencies
216
Maintainers
2
Versions
30
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.18.5 to 1.18.6

4

example.js

@@ -264,1 +264,5 @@ const { Client, Location, List, Buttons, LocalAuth} = require('./index');

client.on('contact_name_change', (contact, newName, oldName) => {
console.log('contact name change', contact, newName, oldName);
});

@@ -277,2 +277,5 @@

on(event: 'remote_session_saved', listener: () => void): this
/** Emitted when a contact name changes */
on(event: 'contact_name_change', listener: (contact: Contact, newName: string, oldName: string) => void): this
}

@@ -279,0 +282,0 @@

2

package.json
{
"name": "@juzi/whatsapp-web.js",
"version": "1.18.5",
"version": "1.18.6",
"description": "Library for interacting with the WhatsApp Web API ",

@@ -5,0 +5,0 @@ "main": "./index.js",

@@ -515,2 +515,7 @@ 'use strict';

await page.exposeFunction('onContactNameChange', async (contact, newName, oldName) => {
const whatsappContact = await this.getContactById(contact.id);
this.emit(Events.CONTACT_NAME_CHANGE, whatsappContact, newName, oldName);
});
await page.evaluate(() => {

@@ -535,3 +540,3 @@ window.Store.Msg.on('change', (msg) => { window.onChangeMessageEvent(window.WWebJS.getMessageModel(msg)); });

});
window.Store.Contact.on('change:name', (contact, newName, oldName) => {window.onContactNameChange(contact, newName, oldName);});
{

@@ -538,0 +543,0 @@ const module = window.Store.createOrUpdateReactionsModule;

@@ -55,3 +55,4 @@ 'use strict';

INCOMING_CALL: 'incoming_call',
REMOTE_SESSION_SAVED: 'remote_session_saved'
REMOTE_SESSION_SAVED: 'remote_session_saved',
CONTACT_NAME_CHANGE: 'contact_name_change',
};

@@ -58,0 +59,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc