<p></p>
<p><b>@pablobm</b> commented on this pull request.</p>
<hr>
<p>In <a href="https://github.com/openstreetmap/openstreetmap-website/pull/6452#discussion_r2444644399">app/views/api/users/_user.xml.builder</a>:</p>
<pre style='color:#555'>> @@ -4,6 +4,14 @@ xml.tag! "user", :id => user.id,
:display_name => user.display_name,
:account_created => user.created_at.xmlschema do
xml.tag! "description", user.description if user.description
+ xml.tag! "company", user.company if user.company
+ if user.social_links
</pre>
<p dir="auto">This will be truthy when there are no links, since in Ruby an empty array is truthy. If you want it not to show in the "no links" case, then do something like this:</p>
⬇️ Suggested change
<pre style="color: #555">- if user.social_links
+ if user.social_links.present?
</pre>
<hr>
<p>In <a href="https://github.com/openstreetmap/openstreetmap-website/pull/6452#discussion_r2444645292">app/views/api/users/_user.xml.builder</a>:</p>
<pre style='color:#555'>> @@ -4,6 +4,14 @@ xml.tag! "user", :id => user.id,
:display_name => user.display_name,
:account_created => user.created_at.xmlschema do
xml.tag! "description", user.description if user.description
+ xml.tag! "company", user.company if user.company
+ if user.social_links
+ xml.tag! "social-links" do
+ user.social_links.each do |link|
+ xml.tag! "link", link["url"]
</pre>
<p dir="auto">Is it worth including the platform?</p>
⬇️ Suggested change
<pre style="color: #555">- xml.tag! "link", link["url"]
+ details = link.parsed
+ xml.tag! "link", details[:url], :platform => details[:platform]
</pre>
<p dir="auto">And something similar for the JSON case.</p>
<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/6452#pullrequestreview-3356010641">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLMD2OGMHRK5QDAQK3D3YS36LAVCNFSM6AAAAACJQJULC6VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZTGNJWGAYTANRUGE">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLKYDC4ZFXF67766T5D3YS36LA5CNFSM6AAAAACJQJULC6WGG33NNVSW45C7OR4XAZNRKB2WY3CSMVYXKZLTORJGK5TJMV32UY3PNVWWK3TUL5UWJTWIBCUJC.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/6452/review/3356010641</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/6452#pullrequestreview-3356010641",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/6452#pullrequestreview-3356010641",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>