You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently /api/v1/chat.react works like a toggle. We call it once, it either removes or adds the reaction.
This behavior causes some difficulties when working with optimistic UI updates.
My proposal is we add a "value" parameter.
"value": true = adds the reaction (returns error if already added)
"value": false = removes the reaction (returns error if not found)
"value" not present = retains old behavior (doesn't break old API usage)
I think this would qualify as a non-breaking update to an existing API
@graywolf336@rafaelks that's the idea,guys. If the API consumer doesn't provide the "value" parameter, the API should behave the same. That's not considered a breaking change, right?
Currently /api/v1/chat.react works like a toggle. We call it once, it either removes or adds the reaction.
This behavior causes some difficulties when working with optimistic UI updates.
My proposal is we add a "value" parameter.
"value": true = adds the reaction (returns error if already added)
"value": false = removes the reaction (returns error if not found)
"value" not present = retains old behavior (doesn't break old API usage)
I think this would qualify as a non-breaking update to an existing API
@rafaelks @MarcosSpessatto @graywolf336
What do you think?
The text was updated successfully, but these errors were encountered: