<p dir="auto">Continuation of <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1889166665" data-permission-text="Title is private" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/4245" data-hovercard-type="pull_request" data-hovercard-url="/openstreetmap/openstreetmap-website/pull/4245/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/pull/4245">#4245</a>.</p>
<p dir="auto">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.</p>
<p dir="auto">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:</p>
<pre class="notranslate"><code class="notranslate">/api/0.6/changeset/<id>?include_discussion=true&show_hidden_comments=true
</code></pre>
<p dir="auto">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 <code class="notranslate">show_hidden_comments</code> would act similar to filters like <code class="notranslate">closed</code> for changesets/notes.</p>
<p dir="auto">The <code class="notranslate">visible</code> attribute is added to each comment to indicate if it's hidden. See also <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1892818701" data-permission-text="Title is private" data-url="https://github.com/zerebubuth/openstreetmap-cgimap/issues/289" data-hovercard-type="pull_request" data-hovercard-url="/zerebubuth/openstreetmap-cgimap/pull/289/hovercard?comment_id=1722363471&comment_type=issue_comment" href="https://github.com/zerebubuth/openstreetmap-cgimap/pull/289#issuecomment-1722363471">zerebubuth/openstreetmap-cgimap#289 (comment)</a>.</p>
<p dir="auto">See <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1586803371" data-permission-text="Title is private" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/3934" data-hovercard-type="pull_request" data-hovercard-url="/openstreetmap/openstreetmap-website/pull/3934/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/pull/3934">#3934</a> for why the parameter is named <code class="notranslate">show_hidden_...</code> I added <code class="notranslate">_comments</code> 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.</p>
<hr>
<h4>You can view, comment on, or merge this pull request online at:</h4>
<p> <a href='https://github.com/openstreetmap/openstreetmap-website/pull/4251'>https://github.com/openstreetmap/openstreetmap-website/pull/4251</a></p>
<h4>Commit Summary</h4>
<ul>
<li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/4251/commits/014de3682a5020cb8e6116d97fddc440f5593f54" class="commit-link">014de36</a> Show hidden comments to moderators if requested</li>
</ul>
<h4 style="display: inline-block">File Changes </h4> <p style="display: inline-block">(<a href="https://github.com/openstreetmap/openstreetmap-website/pull/4251/files">4 files</a>)</p>
<ul>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/4251/files#diff-6726f8601cd22886963fb41888b55956cae4f8124aa12c701da77c3add44d94c">app/controllers/api/changesets_controller.rb</a>
(7)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/4251/files#diff-2ba800641787947c05afd2b26802d7a5153d503d927b8fd4977ff0f468ef62b6">app/views/api/changesets/_changeset.json.jbuilder</a>
(5)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/4251/files#diff-7ae9e3d5c5b18f66d13ff90c5a170b1fa5d0eb94a99cdd608413bb47048ce791">app/views/api/changesets/_changeset.xml.builder</a>
(7)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/4251/files#diff-e95198c7f7744be3ce9857db36d2374538ca7d64caaf0f6f85865d6752563ee9">test/controllers/api/changesets_controller_test.rb</a>
(174)
</li>
</ul>
<h4>Patch Links:</h4>
<ul>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/4251.patch'>https://github.com/openstreetmap/openstreetmap-website/pull/4251.patch</a></li>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/4251.diff'>https://github.com/openstreetmap/openstreetmap-website/pull/4251.diff</a></li>
</ul>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/4251">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLJ3XGQSOVG4MKYTP5TX24L7JANCNFSM6AAAAAA43WHDZE">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLIXCZOESZE55GEEZ4DX24L7JA5CNFSM6AAAAAA43WHDZGWGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHHCPIR7Y.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/openstreetmap-website/pull/4251</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/4251",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/4251",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>