Comments
As some of you people might notice, this post looks a little bit unusual compared to other ones. It has a title, followed by a paragraph, followed by a link. This is due it not being a Note but an Article as far as ActivityPub is concerned. Mastodon makes out of this what you see. Now, why am I writing this thing, well I hope that my comment system is now working. So if you reply to this publicly on Mastodon, it should appear on the page with the link. More details after clicking on the link.
The mapping
As I talk about the mapping article to Mastodon status in the introduction, let me make it explicit:
{
"type": "Article",
"name": "name",
"summary": "summary",
"content": "content",
"url": "https://somewhere"
}
gets turned by Mastodon to
name
summary
https://somewhere
HTML is not allowed in summary. I haven’t tested name, but I would suspect not.
Comment Visibility Policies
Well, this blog post is what I would call web visible. This means that anybody on the internet can view it. It has an URL! In fact, I’ve decided to model it like that in ActivityPub. Objects with an URL are web visible, i.e. they have something that is accessible without a valid FediVerse authentication.
Why am I saying all this: Well people have a chance to reply to this using their FediVerse applications, e.g. Mastodon, if they reply publicly to a web visible post, it makes sense to me that their content also becomes web visible. This means I can display them below.
Comment Policies
Of course, the above is dangerous. Anybody could come along and post something. That’s where comment policies would come in. It would in fact be quite simple for me to add filters to say only display comments made by somebody who either follows or is followed by my FediVerse account.
This would not stop people from commenting. However, it would remove their visibility.
I should be able to reply here, and it appears where I want it.
Of course, I already saw that I forgot to include the CSS styles necessary to display replies.
I'm less sure if the mechanic deployed for this blog is the correct usage of ActivityPub, but it's fun that comments appear on https://blog.mymath.rocks/2023-03-13/Comments.