Add show_hidden parameter for note queries #3934
Open
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.
As a moderator you can hide a note. And you can unhide it of course. The problem is that you can only unhide the note if you know its id. If you've found the note with an api search call, you can't repeat the search to find the note again because hidden notes are skipped by api searches. What if you still want to find the note?
One possible solution is to make hidden notes accessible by search/bbox api calls if the user is logged in and is a moderator. But that might be unexpected by apps that are used to receive notes with either "open" or "closed" status. With this change, if they make a search with authorization headers, they may also get notes with "hidden" status. Not even openstreetmap-website note layer knows how to display such notes.
Another solution, which is implemented here, is to add a parameter, similar to the (undocumented)
show_redactions
parameter that lets moderators see redacted elements. I called the parametershow_hidden
because in case of notes it has nothing to do with redactions.