Explicitly Attached Links

Should we also add random links in the page/note/article content to the attachment array, or only the links explicitly specified by the author? If only the specified, a GNU social Page will look like this:

{
  "type": "Page",
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    {
      "gs": "https://www.gnu.org/software/social/ns#"
    },
    {
      "inConversation": {
        "@id": "gs:inConversation",
        "@type": "@id"
      }
    }
  ],
  "id": "https://instance.gnusocial.test/object/note/1339",
  "published": "2022-03-17T23:30:26+00:00",
  "attributedTo": "https://instance.gnusocial.test/actor/42",
  "name": "hello, world. This is my first bookmark!",
  "summary": "<p>This is the summary of a GNU social bookmark.</p>",
  "content": "<p>This is the description. And it references <a href=\"https://duck.com\">DuckDuckGo></a> too.</p>",
  "mediaType": "text/html",
  "source": {
    "content": "This is the description. And it references [DuckDuckGo](https://duck.com) too.",
    "mediaType": "text/markdown"
  },
  "attachment": [
    {
      "href": "https://gnu.org",
      "type": "Link"
    }
  ],
  "tag": [],
  "inConversation": "https://instance.gnusocial.test/conversation/1339",
  "to": [
    "https://www.w3.org/ns/activitystreams#Public"
  ],
  "cc": [
    "https://instance.gnusocial.test/actor/21"
  ]
}

and this is rendered as:

<h1>hello, world. This is my first bookmark!</h1>
<a href="https://gnu.org" rel="noopener noreferrer">https://gnu.org</a>
<details>
<summary><p>This is the summary of a GNU social bookmark.</p></summary>
<p>This is the description. And it references <a href="https://duck.com">DuckDuckGo></a> too.</p>
</details>
1 Like