snarfed / bridgy-fed

🌉 A bridge between decentralized social network protocols
https://fed.brid.gy
Creative Commons Zero v1.0 Universal
550 stars 29 forks source link

Idea: fallback to summary for other post types? #332

Closed gRegorLove closed 1 year ago

gRegorLove commented 1 year ago

I tried to federate this bookmark before I remembered there's no e-content in my bookmark posts. The logs appeared to create the post with no content, but it doesn't show up in Mastodon (which is fine, better than a blank post):

{
  "published": "2022-12-03 14:53-0800",
  "url": "https://fed.brid.gy/r/https://gregorlove.com/2022/12/bookmarked-farewell-twitter/",
  "@context": "https://www.w3.org/ns/activitystreams",
  "type": "Create",
  "object": {
    "targetUrl": "https://colly.com/articles/farewell-twitter"
  },
  "id": "https://fed.brid.gy/r/https://gregorlove.com/2022/12/bookmarked-farewell-twitter/",
  "to": [
    "https://www.w3.org/ns/activitystreams#Public"
  ],
  "actor": "https://fed.brid.gy/gregorlove.com"
}

I know the docs don't mention p-summary, but I tried it as an experiment. That sent the update:

{
  "published": "2022-12-03 14:53-0800",
  "summary": "Bookmarked: Farewell, Twitter",
  "url": "https://fed.brid.gy/r/https://gregorlove.com/2022/12/bookmarked-farewell-twitter/",
  "@context": "https://www.w3.org/ns/activitystreams",
  "type": "Update",
  "object": {
    "targetUrl": "https://colly.com/articles/farewell-twitter"
  },
  "id": "https://fed.brid.gy/r/https://gregorlove.com/2022/12/bookmarked-farewell-twitter/",
  "to": [
    "https://www.w3.org/ns/activitystreams#Public"
  ],
  "actor": "https://fed.brid.gy/gregorlove.com"
}

Maybe BF could support p-summary? Would that drop the bookmarked link, or would that still appear since BF shows it as the targetUrl?

Current mf2:

{
    "type": [
        "h-entry"
    ],
    "properties": {
        "summary": [
            "Bookmarked: Farewell, Twitter"
        ],
        "author": [
            "https://gregorlove.com/"
        ],
        "url": [
            "https://gregorlove.com/2022/12/bookmarked-farewell-twitter/"
        ],
        "published": [
            "2022-12-03 14:53-0800"
        ],
        "bookmark-of": [
            {
                "type": [
                    "h-cite"
                ],
                "properties": {
                    "name": [
                        "Farewell, Twitter"
                    ],
                    "url": [
                        "https://colly.com/articles/farewell-twitter"
                    ]
                },
                "lang": "en",
                "value": "https://colly.com/articles/farewell-twitter"
            }
        ]
    },
    "lang": "en"
}
snarfed commented 1 year ago

Yeah sadly summary is complicated in AP: Mastodon [ab]uses it for their "content warning" feature. Lots more background in https://github.com/snarfed/bridgy-fed/issues/47. I don't actually know Mastodon or the CW feature well enough, but @fluffy-critter and others do. Happy to tweak things if we're confident we know what we want!

snarfed commented 1 year ago

Tentatively closing, I don't know that we have a clear idea or ask here. @gRegorLove @fluffy-critter feel free to reopen!