Skip to content

Commit 0c581b5

Browse files
committed
Fixed markAsRead() bug
1 parent 2d3e549 commit 0c581b5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

fetch.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,16 @@ function messages(token, v, phoneID, to, object) {
4545
*/
4646
function read(token, v, phoneID, message_id) {
4747
return fetch(`https://graph.facebook.com/${v}/${phoneID}/messages`, {
48-
method: "PUT",
48+
method: "POST",
4949
headers: {
5050
'Authorization': `Bearer ${token}`,
5151
'Content-Type': 'application/json',
5252
},
53-
body: {
53+
body: JSON.stringify({
5454
messaging_product: "whatsapp",
5555
status: "read",
5656
message_id,
57-
}
57+
}),
5858
});
5959
}
6060

0 commit comments

Comments
 (0)