Custom status text keeps trailing spaces in the settings API

(#3592) Bug Won't fix api

Thread

Comment by Rex
RexSystem 1 vote
Status changed from Needs triage to Needs info
Moved to a bug report, since text returned by the API should never keep leading or trailing spaces. The API trims and normalizes custom_status.text before storing it, the same as other text input, and GET returns what was stored. We can't reproduce trailing spaces: sending your example text with three trailing spaces to PATCH /users/@me/settings stores and returns it without them. To look into it further, please add:
  • the exact request you sent (the method, URL and JSON body, with your token removed)
  • the raw text from the GET response, for example piped through xxd or od -c, so we can see which characters the trailing ones are
  • which client or tool set the status (the Fluxer app, your integration, or the gateway)
Don't rely on the text matching your input byte for byte. Comparing trimmed text is safe.