Skip to content

Commit

Permalink
fix: 🐛 clean
Browse files Browse the repository at this point in the history
  • Loading branch information
hcfw007 committed Dec 20, 2024
1 parent 97e5e8f commit 927277d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Client.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const { LoadUtils } = require('./util/Injected/Utils');
const ChatFactory = require('./factories/ChatFactory');
const ContactFactory = require('./factories/ContactFactory');
const WebCacheFactory = require('./webCache/WebCacheFactory');
const { ClientInfo, Message, MessageMedia, Contact, Location, Poll, PollVote, GroupNotification, Label, Call, Buttons, List, Reaction, Broadcast} = require('./structures');
const { ClientInfo, Message, MessageMedia, Contact, Location, Poll, PollVote, GroupNotification, Label, Call, Buttons, List, Reaction, Broadcast, UrlLink, ProductMessage} = require('./structures');
const NoAuth = require('./authStrategies/NoAuth');
const {exposeFunctionIfAbsent} = require('./util/Puppeteer');

Expand Down Expand Up @@ -628,12 +628,12 @@ class Client extends EventEmitter {
}
});

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

await page.exposeFunction('onRemoveChatEvent', async (chat) => {
await exposeFunctionIfAbsent(this.pupPage, 'onRemoveChatEvent', async (chat) => {
const _chat = await this.getChatById(chat.id);

/**
Expand Down

0 comments on commit 927277d

Please sign in to comment.