Skip to content

Commit

Permalink
fix: object returns correct deleteMessages
Browse files Browse the repository at this point in the history
  • Loading branch information
jonalan7 committed Apr 7, 2021
1 parent 42de851 commit e99edfd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/wapi/functions/delete-messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ export async function deleteMessages(chatId, messageArray) {
),
];

const result = (await Promise.all(jobs))[0][0];
const result = (await Promise.all(jobs))[1];

if (result === 'success' || result === 'OK') {
if (result >= 0) {
let obj = WAPI.scope(To, false, result, '');
Object.assign(obj, m);
return obj;
Expand Down

0 comments on commit e99edfd

Please sign in to comment.