-
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
API for updating attribution domains #32730
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If for whatever reason we don't want the API change here, we should pull out the normalization/validation changes and do those.
This pull request has merge conflicts that must be resolved before it can be merged. |
# Conflicts: # config/locales/simple_form.nl.yml
This pull request has resolved merge conflicts and is ready for review. |
This pull request has merge conflicts that must be resolved before it can be merged. |
# Conflicts: # config/locales/simple_form.nl.yml
This pull request has resolved merge conflicts and is ready for review. |
This pull request has merge conflicts that must be resolved before it can be merged. |
Is
|
# Conflicts: # app/views/settings/verifications/show.html.haml # config/locales/simple_form.cy.yml
No, good catch. I have removed it now. |
This pull request has resolved merge conflicts and is ready for review. |
This pull request has merge conflicts that must be resolved before it can be merged. |
# Conflicts: # spec/models/account_spec.rb
This pull request has resolved merge conflicts and is ready for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks ok to me, but I'd like to have another pair of eyes on it.
The added request specs should most probably be system specs instead.
There is already a documentation PR (mastodon/documentation#1558) but it may also warrant an API version bump (see Mastodon::Version.api_version
)
# Conflicts: # spec/models/account_spec.rb
This pull request has resolved merge conflicts and is ready for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall I think this good, thanks a lot.
I did find two more minor problems though. Please have a look at my comments when you have time.
This pull request has merge conflicts that must be resolved before it can be merged. |
# Conflicts: # spec/models/account_spec.rb
This pull request has resolved merge conflicts and is ready for review. |
Thank you for taking the time to consider my remarks. This looks good to me now. The accompanying docs PR (mastodon/documentation#1558) is no longer accurate after the latest changes. Would you be so kind and update that as well? Thanks! (Oh, and when you do: The first version this will most probably be introduced in will be 4.4.) |
Add API support for updating attribution domains.
This moves the existing validation and normalization from the dynamic attribute (...
_as_text
) to the “real” database attribute, so it is shared with the API. The text↔array conversion is not used by the API, so this is moved to the controller for the settings page.This feature may be useful e.g. for online newspapers that want to update the setting for all staff writers.
Documentation PR: mastodon/documentation#1558