Ignore incoming activities which have been received before, add /activities
endpoint #118
Loading…
Reference in New Issue
No description provided.
Delete Branch "activity-checks"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The first commit should be pretty clear. This is required by the Activitypub standard, and also helps to simplify our code a bit.
The
/activities
endpoint is also straightforward, but there is one problem: it will return activities related to private messages orFollow
/Accept
. We need to add some way to exclude those, maybe a columnsensitive
on the activity table?Also this change does not prevent periodically clearing out the activity table. The changes here are only important for new activities, so if those over 1 month old or so are deleted, everything will still work fine. The inbox would throw an error instead of http 200 if somehow an old activity were delivered, and the http endpoint would not find old activities. But those are very minor problems.
For some reason this failed in travis, I restarted the job just to make sure.
Forgot to add the migration, fixed now.
@ -4,0 +32,4 @@
.await?;
match existing {
Ok(_) => Ok(true),
Err(_) => Ok(false),
This works, but seems like it'd be easier to just return existing.
Looks good to me, and tests passed so I'll merge.
We still need to fix the problem that private message and follow activities are available over HTTP without authentification.