It's been sorta fun wrangling AP into an image board fe
Have you considered adding the "summary" field on outbound notes? I can parse the leading <h1> from how Mitra handles incoming note summaries into "subjects", but sending notes with that field would be nice for Pleroma interop.
@harblinger What would be the value of this summary field? Headings are part of the content in Mitra, I can try to extract the first heading from HTML, but this method is not always reliable (we do this for Atom feeds).
>sending notes with that field would be nice for Pleroma interop.
I have thought a lot about titles and summaries, but haven't yet decided how to proceed. There are too many special cases.
The top-level heading in a Mitra post is a title, and shouldn't be used as a summary. There is a different attribute for titles in ActivityPub, name. However, If I extract the <h1> and federate it as a name, other Mitra instances will display two titles.
A summary, ideally, should not be displayed anywhere, because it is a summary of content. It's redundant by design. But Mastodon uses it as a "content warning", so Mitra has to insert it into the post to avoid losing important information.
If Pleroma uses summary for "subject", that makes things even more complicated.
There is probably a way to make it all work, but I don't quite understand your use case. What exactly you're trying to implement, a content warning?
>What would be the value of this summary field? Headings are part of the content in Mitra, I can try to extract the first heading from HTML, but this method is not always reliable (we do this for Atom feeds).
I got the <h1> parsing done last night, see 2nd screenshot
Value is pretty slim for the amount of work needed possibly (another column in the db), but just being able to set it and send it down the wire would allow the front end to use/abuse the field so pleroma-fe can set the "subject" (see first screenshot) and masto to set the "CW", not sure about other cases.
No big deal, I can just have a subject field in the fe and prepend it in <h1> tags and that should work. I was just wondering if you thought about it much.
@harblinger@silverpill It is called a subject for mostly historical reasons and I would prefer for it to stay that way. Pleroma-FE gives you the option to treat it both ways. By default posts with subjects aren't compacted, but that can be enabled in the settings to treat them like CWs. And posts with subjects made by Pleroma aren't marked as `sensitive` in the ActivityPub Object representation unless an image marked sensitive is attached in FE. (Technically the sensitive field is set by an option in the MastoAPI call.)
@harblinger I am leaning towards introducing an optional title. This would be aligned with how Mitra handles content warnings today (it converts them into titles), and aligned with my plans to make Mitra work better for long-form content (think Substack and Medium).
@silverpill@harblinger It should federate successfully, but I don't think it will show it as subject in MastoAPI responses. If you send me an Object like that and preferably also a link to it, it should be a small change.
Although issues arise when you then also send summary for compat reasons with other implementations and they aren't the same. At that point, I would probably override name with content of summary or drop it entirely.
- POST /api/v1/statuses will accept an additional parameter, title. - This value will be exposed as Status.title and also inserted into Status.content (for now). - If you want to display post's title, you will need to remove Status.title from Status.content to avoid duplication. - The title will be federated as name, and it will not be inserted into Note.content. - A name on incoming objects will be treated as title, exposed as Status.title, and inserted into Status.content (same as with locally created posts).