Skip to content

Commit

Permalink
feat: Update the minimal WhatsApp to 2.2331.x
Browse files Browse the repository at this point in the history
  • Loading branch information
edgardmessias committed Aug 16, 2023
1 parent 18f09ef commit f9ac1ea
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 12 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -95,7 +95,7 @@
"webpack-cli": "^5.1.4"
},
"dependencies": {
"@wppconnect/wa-js": "^2.24.6",
"@wppconnect/wa-js": "^2.24.8",
"@wppconnect/wa-version": "^1.2.60",
"atob": "^2.1.2",
"axios": "^1.4.0",
Expand Down
4 changes: 3 additions & 1 deletion src/api/helpers/evaluate-and-return.ts
Expand Up @@ -134,7 +134,9 @@ export async function evaluateAndReturn<T extends EvaluateFn>(
let jsStack = error.stack;
Error.captureStackTrace(error);
if (jsStack) {
error.stack = (error.stack || '') + '\nJS Stack: ' + jsStack;
error.stack = `${
error.stack || ''
}\nJS Stack: ${jsStack}\nFunction: ${functionText}`;
}

throw error;
Expand Down
2 changes: 1 addition & 1 deletion src/api/layers/group.layer.ts
Expand Up @@ -133,7 +133,7 @@ export class GroupLayer extends RetrieverLayer {
public async createGroup(groupName: string, contacts: string | string[]) {
return await evaluateAndReturn(
this.page,
({ groupName, contacts }) => WPP.group.create(groupName, contacts),
({ groupName, contacts }) => WPP.group.create(groupName, contacts, null),
{ groupName, contacts }
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/config/create-config.ts
Expand Up @@ -188,7 +188,7 @@ export const defaultOptions: CreateConfig = {
waitForLogin: true,
logger: defaultLogger,
tokenStore: 'file',
whatsappVersion: '2.2307.x',
whatsappVersion: '2.2331.x',
deviceName: false,
linkPreviewApiServers: null,
disableGoogleAnalytics: true,
Expand Down
2 changes: 1 addition & 1 deletion src/lib/wapi/functions/get-chat-by-name.js
Expand Up @@ -16,7 +16,7 @@
*/

export function getChatByName(name, done) {
const found = WPP.whatsapp.ChatStore.find((chat) => chat.name === name);
const found = WPP.chat.find((chat) => chat.name === name);
if (done !== undefined) done(found);
return found;
}

0 comments on commit f9ac1ea

Please sign in to comment.