Skip to content

Commit

Permalink
Fix wit-ai#64. Check for bot's message (wit-ai#75)
Browse files Browse the repository at this point in the history
Fix for 'Error: (wit-ai#100) No matching user found' error for  bot's message.
  • Loading branch information
Taresh authored and patapizza committed Oct 12, 2016
1 parent 3ebd1aa commit 84bc334
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/messenger.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ app.post('/webhook', (req, res) => {
if (data.object === 'page') {
data.entry.forEach(entry => {
entry.messaging.forEach(event => {
if (event.message) {
if (event.message && !event.message.is_echo) {
// Yay! We got a new message!
// We retrieve the Facebook user ID of the sender
const sender = event.sender.id;
Expand Down

0 comments on commit 84bc334

Please sign in to comment.