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:
@ -201,8 +201,8 @@ def handle_incoming_follow(activity):
|
||||
# TODO: allow users to manually approve requests
|
||||
try:
|
||||
models.UserRelationship.objects.create(
|
||||
user_subject=to_follow,
|
||||
user_object=user,
|
||||
user_subject=user,
|
||||
user_object=to_follow,
|
||||
status='follow_request',
|
||||
relationship_id=activity['id']
|
||||
)
|
||||
|
Reference in New Issue
Block a user