Skip to content

Commit

Permalink
Merge pull request #136 from dephea/master
Browse files Browse the repository at this point in the history
fix readChat()
  • Loading branch information
Amele9 authored Mar 11, 2024
2 parents 4cee0a2 + d4c9599 commit cb2fa50
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/utils/MessageAPI.js
Original file line number Diff line number Diff line change
Expand Up @@ -265,10 +265,9 @@ class MessageAPI {

const method = 'readChat';

const postData = {
'idMessage': idMessage,
}
const postData = {}

this.addMessageIdParam(postData, idMessage)
this.addChadIdParam(postData, chatId)
this.addPhoneParam(postData, phoneNumber)

Expand Down Expand Up @@ -388,6 +387,12 @@ class MessageAPI {
postData.chatId = `${phoneNumber}@c.us`
}
}

addMessageIdParam(postData, idMessage){
if (idMessage) {
postData.idMessage = idMessage
}
}
}

class Message {
Expand Down

0 comments on commit cb2fa50

Please sign in to comment.