Extra space in spark/flash/status event data

I was looking for spark/flash/status events so my app could track the status of flashing and update some UI before allowing the system to be controlled again.
However, I was coding fast and loose and found myself comparing a string with the == operator and scratching my head as to why it wasn't working. It took me a few minutes to see that started and success were actually started and success (with trailing spaces). Comparing with a .contains() method fixed my issue of course, but the API documentation does seem to imply that there are no trailing spaces for the 3 data values. I realize that fixing this could break some integrations (like if they compared a string the way I was as trying to do) so maybe just a note in the docs could be useful otherwise.

This was on a Photon 2, 5.8.0+

1 Like

This is a known problem, that can't easily be fixed, because it's been that way forever, and some people may have implemented their version by testing with an extra spaces, instead of contains.

Is it worth adding a caveat to the docs?