Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- wrapModuleFunction(getPhoneNumber, (func, ...args) => {
- const [wid] = args;
- if (wid && wid.toString().includes('lid')) {
- try {
- const { ApiContact } = require('../whatsapp/misc');
- if (ApiContact && typeof ApiContact.getPhoneNumber === 'function') {
- try {
- const phoneWid = ApiContact.getPhoneNumber(wid);
- if (phoneWid && phoneWid !== wid) {
- return phoneWid;
- } else {
- }
- } catch (phoneError) {
- }
- }
- const { functions } = require('../whatsapp');
- if (functions && typeof functions.getPnForLid === 'function') {
- try {
- const contact = { id: wid };
- const pnForLid = functions.getPnForLid(contact);
- if (pnForLid) {
- return pnForLid;
- } else {
- }
- } catch (pnError) {
- }
- }
- } catch (error) {
- }
- return wid;
- }
- try {
- const result = func(...args);
- return result;
- } catch (funcError) {
- return wid;
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement