rougeth / bottery

[DEVELOPMENT-HALTED] :battery: A bot framework with batteries included
MIT License
344 stars 51 forks source link

Messenger considering wrong payload from Facebook webhook #164

Open rougeth opened 6 years ago

rougeth commented 6 years ago

The Messenger platform isn't running message handler for all messages that arrives in batch. At platform/messenger/engine.py#L46, we are getting only the first item of entry:

{
  "object":"page",
  "entry":[
    {
      "id":"<PAGE_ID>",
      "time":1458692752478,
      "messaging":[
        {
          "sender":{
            "id":"<PSID>"
          },
          "recipient":{
            "id":"<PAGE_ID>"
          },
          # ...
        }
      ]
    }
  ]
}

Reference: https://developers.facebook.com/docs/messenger-platform/reference/webhook-events