Show hidden comments to moderators if requested #4251
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Continuation of #4245.
With comment ids shown it's possible to hide specific comments. But the unhiding also requires comment ids. They are not known because the comments are hidden from the api calls.
Here a parameter is added to show hidden comments. It makes hidden comments visible to users who can unhide comments. The request looks like this:
I chose to add a parameter instead of showing the comments to anyone with permissions in case there are too many hidden comments. Maybe later some kind of limit will be added, making changeset with discussion requests to look like search requests. In this case
show_hidden_comments
would act similar to filters likeclosed
for changesets/notes.The
visible
attribute is added to each comment to indicate if it's hidden. See also zerebubuth/openstreetmap-cgimap#289 (comment).See #3934 for why the parameter is named
show_hidden_...
I added_comments
at the end in case there's something else to be hidden in changeset metadata. This allows for tags or bbox hiding to be added later if necessary.