Skip to content

Commit

Permalink
Merge pull request #76 from bottenderjs/put-text-into-message
Browse files Browse the repository at this point in the history
fix: put text into message for send private messages
  • Loading branch information
wtflink authored Dec 24, 2019
2 parents 893ac85 + 8127d99 commit 87e66e7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/FacebookBatch.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ function sendPrivateReply(objectId: string, text: string, options?: Object) {
body: {
messaging_type: 'UPDATE',
recipient: { comment_id: objectId },
text,
message: {
text,
},
...options,
},
};
Expand Down
4 changes: 2 additions & 2 deletions src/__tests__/FacebookBatch.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ describe('sendPrivateReply', () => {
body: {
messaging_type: 'UPDATE',
recipient: { comment_id: COMMENT_ID },
text: 'ok',
message: { text: 'ok' },
},
});
});
Expand All @@ -27,7 +27,7 @@ describe('sendPrivateReply', () => {
body: {
messaging_type: 'UPDATE',
recipient: { comment_id: COMMENT_ID },
text: 'ok',
message: { text: 'ok' },
access_token: CUSTOM_ACCESS_TOKEN,
},
});
Expand Down

0 comments on commit 87e66e7

Please sign in to comment.