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

Support undo activities, dont remove accepted inbox items #47

Merged
merged 4 commits into from
Mar 5, 2024

Conversation

RangerMauve
Copy link
Contributor

  • fixed a bug where rejected follows were actually accepted
  • accepted activities no longer get removed
  • added code path for Undo activities
  • checks that the same author that made the activity made the undo activity
  • removes the activity from the inbox
  • if it was a follow request, removes it.

@catdevnull
Copy link
Contributor

not familiar with the ActivityPub stuff but otherwise looks good

Copy link
Collaborator

@akhileshthite akhileshthite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!
Do we need to have tests for this in apsytem.test.ts; performUndo removes activity and follower for a Follow activity?

Copy link
Collaborator

@fauno fauno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my expectation was for the undo/delete activities to remove the activity they reference, are always honored, so they aren't stored on the inbox for approval/rejection (ie. i don't approve you removing a reply).

but webhooks need to be notified in case i already did something with the activity. in the moderation queue we're storing activities with different states, so if someone undoes/deletes an activity, the moderation queue needs to be notified to change its state.

this seems to be the case because the onapproved hook is dispatched, but auto-approval is required to work properly.

src/server/apsystem.ts Show resolved Hide resolved
src/server/apsystem.ts Show resolved Hide resolved
src/server/apsystem.ts Show resolved Hide resolved
src/server/apsystem.ts Show resolved Hide resolved
src/server/apsystem.ts Outdated Show resolved Hide resolved
Copy link
Collaborator

@fauno fauno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@RangerMauve RangerMauve merged commit 898da52 into main Mar 5, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants