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

Allow removing followers and fix follow rejections #3124

Merged
merged 5 commits into from
Dec 12, 2023

Conversation

hughrun
Copy link
Contributor

@hughrun hughrun commented Nov 19, 2023

  • adds the ability to remove a user from your followers list
  • fixes verbs.Reject to process "reject" activities for previously accepted follows in both directions

To explain the second point - previously when e.g. a Mastodon user deleted a follow by a BookWyrm user, BookWyrm errored out when received the reject activity so the Mastodon user was still listed in "following". This PR fixes this so that users are removed from the "followers" list of the user deleting the follow, and also deleted from the "following" list of the target user.

fixes #2635

* adds the ability to remove a user from your followers list
* fixes verbs.Reject to process reject activities for previously accepted follows in both directions

fixes bookwyrm-social#2635
@hughrun
Copy link
Contributor Author

hughrun commented Nov 20, 2023

@bookwyrm-social/code-review this can be checked with a Mastodon account, but I probably should add one or two tests?

Copy link
Contributor

@dato dato left a comment

Choose a reason for hiding this comment

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

Hi! I wanted to test this on my instance. In the process, found one tiny error, below, and then have a comment about UX.

bookwyrm/activitypub/verbs.py Outdated Show resolved Hide resolved
bookwyrm/templates/snippets/follow_button.html Outdated Show resolved Hide resolved
- rationalise activitypub.Reject and fix model being undefined
- fix not being able to follow users from followers page: 'delete' option now in user_options dropdown
- revert bookwyrm.js
- fix delete_follow_request deleting instead of rejecting
- add user id to 'remove-follow' path
@hughrun
Copy link
Contributor Author

hughrun commented Nov 21, 2023

@dato better?

Copy link
Contributor

@dato dato left a comment

Choose a reason for hiding this comment

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

@dato better?

Works beautifully! Tested against Mastodon, and BookWyrm as well.

bookwyrm/templates/snippets/user_options.html Outdated Show resolved Hide resolved
@hughrun hughrun marked this pull request as draft November 22, 2023 01:11
@hughrun hughrun marked this pull request as ready for review November 22, 2023 09:20
@mouse-reeve mouse-reeve merged commit 4bfa1ca into bookwyrm-social:main Dec 12, 2023
10 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.

Allow for soft-blocking followers
3 participants