While creating new integration webhooks for both spark/flash/status and spark/device/app-hash I noticed that there is a trailing white space in the data property of the spark/flash/status event. This makes it difficult to compare to strings in switch or if statements. The white space is only present in the spark/flash/status events.
Webhook Configuration for JSON
{
"event": "{{{PARTICLE_EVENT_NAME}}}",
"data": "{{{PARTICLE_EVENT_VALUE}}}",
"coreid": "{{{PARTICLE_DEVICE_ID}}}",
"published_at": "{{{PARTICLE_PUBLISHED_AT}}}",
"userid": "{{{PRODUCT_USER_ID}}}",
"fw_version": "{{{PRODUCT_VERSION}}}",
"public": "{{{PARTICLE_EVENT_PUBLIC}}}"
}
Log event directly copied from particle integration page
{
"name": "spark/flash/status",
"data": "success ",
"ttl": 60,
"published_at": "2024-05-10T19:31:14.315Z",
"coreid": "e00fce684cc9c44639a5a565",
"userid": "",
"version": 503,
"public": false,
"productID": 22336
}