Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Community Outbox should contain Activities #1216

Closed
lanodan opened this issue Oct 21, 2020 · 8 comments
Closed

Community Outbox should contain Activities #1216

lanodan opened this issue Oct 21, 2020 · 8 comments
Labels
area: database area: federation support federation via activitypub enhancement New feature or request

Comments

@lanodan
Copy link

lanodan commented Oct 21, 2020

Hi, Pleroma dev here, I did some quick checks on what Lemmy federates and found some issues (btw Pleroma lacks Group at the moment so most of Lemmy couldn't work).

Instance used: https://enterprise.lemmy.ml/ which seems to run v0.7.64

@lanodan lanodan added the bug Something isn't working label Oct 21, 2020
@lanodan lanodan changed the title Found some ActivityPub issues ActivityPub issues: Retrieving Objects, Outbox Oct 21, 2020
@Nutomic Nutomic added the area: federation support federation via activitypub label Oct 21, 2020
@Nutomic
Copy link
Member

Nutomic commented Oct 21, 2020

I fixed your first issue here: https://yerbamate.dev/LemmyNet/lemmy/pulls/114

dessalines pushed a commit that referenced this issue Oct 21, 2020
@Nutomic Nutomic changed the title ActivityPub issues: Retrieving Objects, Outbox Community Outbox should contain Activities Oct 22, 2020
@Nutomic Nutomic added enhancement New feature or request and removed bug Something isn't working labels Nov 16, 2020
@Nutomic
Copy link
Member

Nutomic commented Nov 16, 2020

One way to fix this would be by adding an actor column to the activities table. Then we could easily return the last X activities of that actor for the community outbox HTTP endpoint. And we will have to parse it on the fetching side.

@dessalines
Copy link
Member

We shouldn't have removed user_id in that case then, bc we could join to get the actor from there. We have that down.sql, so it'd be easy to add back in.

@Nutomic
Copy link
Member

Nutomic commented Nov 16, 2020

It can be either a user or a community, so calling it user_id doesnt make sense. Maybe we could have both user_id and community_id columns, with a constraint that exactly one of them is non-null.

@dessalines
Copy link
Member

Ohhh I see.

@Nutomic
Copy link
Member

Nutomic commented Nov 18, 2020

Actually there's another problem: if we just serve all activities that the community sent in the outbox, then there might be hundreds of votes and comments. What we want are just the latest 20 posts, so in a very active community we might have to go through dozens of outbox pages to get those. Might be better if we only serve Create/Post in the community outbox, but then we also need to filter for those in the database.

@lanodan
Copy link
Author

lanodan commented Nov 21, 2020 via email

@Nutomic
Copy link
Member

Nutomic commented Jan 21, 2021

I found a crate diesel_json which could help with querying and filtering based on json fields. Hopefully they can add support for the -> operator, then this should be no problem. Upstream issue is here

And here's the unfinished code for this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: database area: federation support federation via activitypub enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants