How to implement a group's blog?

Hi,

I want to write an application where users can join groups and each group has its own blog (and its own calendar but this is another issue).
People who are not in the group cannot read the groups blog. When users join the group, they get access to all previously posted articles. If users leave the group, they will no longer be able to access the articles on the blog.

In this application I want to use ActivityPub and ActivityStreams 2.0, but I am not sure what’s the best way to post articles on a group’s blog and access them later.

So I have these three actions (ActivityStreams 2.0 vocabulary is written in fat):

Posting on a blog:
A Person Creates an Article which is attributedTo himself and is sent to the group’s blog.

Reading all articles from a blog:
Read the outbox (or inbox?) of the group’s blog.

Follow a blog to receive notifications about new posts on that blog:
A Person can follow a group’s blog. When someone Creates a new Article on the group’s blog this Article is send to the following persons inbox.

So the group’s blog should be “someone” you can send messages to. I am quite new to ActivityPub, but it seems, like only actors have an inbox to receive messages.
As there is no ActivityStreams 2.0 type called “blog” I think the best fitting type would be Group.
Am I right? Or is there a better fitting type?

The next question is: Should people read the inbox of a group’s blog or it’s outbox?
Or can the inbox and the outbox be the same object?

Should I copy an Article from the group’s blog inbox to it’s outbox and change the to attribute from group’s blog to a list containing all group members, without sending the Article to the inboxes of all group members and instead send the article only to the group’s blog followers list?

Should the to attribute be used to check if people have access to the Article? Or should I implement access control independet from ActivityPub?
And are inboxes used for notifications or only for presenting Articles on a user’s startpage/timeline.

As I wrote ActivityPub is new to me. So if i messed something up, please correct me.

3 Likes

Hey @wobber -
noticing that this is your first post here and this is awesome.
Welcome!


I saw that your questions are about things which are not really specified yet which is awesome too!
The implementation of groups is very actively discussed here.
Check the Search feature in the top bar.
There is this active (very long :wink: ) thread:

and maybe “Group Conversation Viewing” answers some questions …

The usage of Groups is not really specified in ActivityPub Core and that is where Fediverse Enhancement Proposals come in.
See Standardizing on ActivityPub Groups - #54 by grishka who created the FEP


a short hint: Markdown is supported here.
Personal flavour :slight_smile: suggesting to format AS-vocabulary as preformatted text, which is also the code-button or the text betweent ``-tickmarks, so it is
Create instead Create


And then you are absolutely right:

but it seems, like only actors have an inbox to receive messages.

I think the best fitting type would be Group.
Am I right? Or is there a better fitting type?

It is the best fitting type, but ActivityPub is JSON-LD and type (like most properties in ActivityPub) can be multiple, so it is up to you to specify it further with other vocabularies …
E.g.
{ "type": ["Group", "https://schema.org/Blog"] }

The next question is: Should people read the inbox of a group’s blog or it’s outbox?
Or can the inbox and the outbox be the same object?

See this specification part for the differences …
They can’t be the same cause access control.
People read the Outbox

Should I copy an Article from the group’s blog inbox

I guess if the Group inbox receives an Announce activity it is not specified, either the blog is an actor itself and if it is addressed, then “send the article only to the group’s blog followers list” …

Then see ActivityPub
and please ask again if anything is unclear …

2 Likes

Hi @Sebastian
thank you for the warm welcome and your suggestions.

Unfortunately, many cases are not well specified (and sometimes this seems to be intentional).
I try to avoid using non Acvtivity Streams types, because I am sure this would reduce interoperability, but multiple types are a great way to solve this.
Also FEPs seem to be a good way to create a (more strict?) superset. Which I really appreciate. I sure will write some in the future (but not this year).

I should have specified that more precisely. The groups are private groups and only members of the group should be able to read articles on the group’s blog. There are no public articles on the group’s blog and nobody can do any activities as a group (it’s a passive actor).

So my question is:

Do Persons who are member of a Group read Articles from this Group's inbox or outbox?

The specification there is unclear, because it says multiple users could be allowed to read the same inbox. Which makes sense in the context of a group. Because the group does not write own articles (the group’s members do) it would not have any articles in its outbox. But if people read from the outbox (as you said) the articles have to get there somehow.
This is what i meant with same object. They are different endpoints but in the group’s context they deliver the same data object.

2 Likes

The inbox is where the group receives activities from other actors. The outbox contains activities which were sent out by the group. In our case the inbox is simply an HTTP POST endpoint, not something that could be read, whereas the outbox serves a json document via GET (containing an OrderedCollection of activities).

For private groups, you’ll probably want to enforce the use of http-signatures and only provide the contents of the outbox to signed requests by group members.