Duplicate webhook notifications

Thanks for your reply Barry.

The response to an incoming webhook is:

$ curl -i https://xxx/cgi-bin/twitch_webhook.py
HTTP/1.1 200 OK
Date: Tue, 23 Oct 2018 20:57:35 GMT
Server: Apache/2.4.25 (Debian)
Content-Length: 0
Content-Type: text/plain; charset=UTF-8

The data processing is handed off to a separate process so that the webhook handler can return as soon as possible. Apache logs show the response time of the webhook handler is usually a 2ms or less.

On closer inspection, I’ve noticed a difference between the duplicate notifications - the language tag. On the first notification it’s

"language":""

On the second/duplicate:

"language":"en" or "en-gb"

This looks like the initial notification has not correctly picked up the language of the stream.

Another oddity is that it is inconsistent as to whether the notification ID changes, even though the language data has.