ker0x/messenger

On "standby" event, Postback doesn't contain payload

Khodl opened this issue · 1 comments

Khodl commented

FYI, it's possible that a Postback event doesn't contain payload. For instance when standbywebhook is set, we may also receive this event:

{
    "object": "page",
    "entry": [
        {
            "id": "270383946729865",
            "time": 1504876176615,
            "standby": [
                {
                    "recipient": {
                        "id": "270383946729865"
                    },
                    "timestamp": 1504876176615,
                    "sender": {
                        "id": "1260743020679416"
                    },
                    "postback": {
                        "title": "Details"
                    }
                }
            ]
        }
    ]
}

When someone click on a list's button, it will send the normal event (with payload), and also the standby one.

It may cause a problem there: src/Model/Callback/Postback.php on line 62

It's not important in my case, I simply deactivated the standby webhook. Just wanted to let you know about it.

ker0x commented

@Khodl thanks for the report! I will fix that in the coming days ;)