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

Handle ActivityPub follows correctly #4571

Merged
merged 4 commits into from
Aug 10, 2017
Merged

Conversation

Gargron
Copy link
Member

@Gargron Gargron commented Aug 10, 2017

ActivityPub follows are follow-requests. Always require an Accept.
If account is not locked, auto-accept.

ActivityPub follows are follow-requests. Always require an Accept.
If account is not locked, auto-accept.
@Gargron Gargron added the activitypub Protocol-related changes, federation label Aug 10, 2017
NotifyService.new.call(target_account, follow)
follow_request = FollowRequest.create!(account: @account, target_account: target_account)

if target_account.locked?
Copy link
Member

Choose a reason for hiding this comment

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

does activitypub have a concept of a locked account? I'm not sure I follow the flow of this logic.

Copy link
Member Author

Choose a reason for hiding this comment

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

No but we do.

If we get a Follow and we are locked, we create a follow request and notify the user about the follow request. If we are not locked, we auto-accept the follow and notify the user about the follow.

@Gargron Gargron merged commit 81c1303 into master Aug 10, 2017
@Gargron Gargron deleted the feature-activitypub-follows branch August 10, 2017 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
activitypub Protocol-related changes, federation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants