Fix quote_approval_policy being reset to user defaults when omitted in status update#37436
Fix quote_approval_policy being reset to user defaults when omitted in status update#37436ClearlyClaire merged 2 commits intomastodon:mainfrom
quote_approval_policy being reset to user defaults when omitted in status update#37436Conversation
|
Would be good to add a spec showing the previously broken behavior here so we dont add regression at some point. I suspect what's happening here is in this concern - https://github.com/mastodon/mastodon/blob/v4.5.4/app/controllers/concerns/api/interaction_policies_concern.rb#L7 - the logic of "use the param if supplied, and the user default if not" makes sense when we create for the first time, but not on update. We may be able to find a more elegant way to remove that one item from the update hash... |
|
I am not smart enough to write specs. |
|
@ClearlyClaire please review as this is quote related. |
|
This behavior is documented as “if omitted, it will use the user’s default settings” in https://docs.joinmastodon.org/client/quotes/, but I agree this is a foot-gun, and it is not consistently documented. |
quote_approval_policy being reset to user defaults when omitted in status update
|
I think this is more of a bugfix than an API change as the current behavior is poorly documented, and while it should not affect clients aware of quote posts, it can definitely affect users with clients that are not aware of it. Marked as to be backported. |
… in status update (#37436)
… in status update (#37436)
… in status update (mastodon#37436)
… in status update (mastodon#37436)
… in status update (mastodon#37436)
… in status update (mastodon#37436)
… in status update (mastodon#37436)

I've confirmed this is an issue with the API logic and the web frontend correctly supplies the value. (No need for documentation to be updated)
Validation test