Reverse user_subject & user_object.
In the relationships table: user_subject should be the user doing the following. user_object should be the user who is followed. This fixes a bug where unfollowing a user deletes the relationship in both directions.
This commit is contained in:
@ -88,8 +88,8 @@ def handle_outgoing_follow(user, to_follow):
|
||||
def handle_outgoing_unfollow(user, to_unfollow):
|
||||
''' someone local wants to follow someone '''
|
||||
relationship = models.UserRelationship.objects.get(
|
||||
user_object=user,
|
||||
user_subject=to_unfollow
|
||||
user_subject=user,
|
||||
user_object=to_unfollow
|
||||
)
|
||||
activity = activitypub.get_unfollow(relationship)
|
||||
errors = broadcast(user, activity, [to_unfollow.inbox])
|
||||
|
Reference in New Issue
Block a user