1
0
Fork 0

Update follow and unfollow to use UserFollowRequest & UserFollows.

This commit is contained in:
Adam Kelly 2020-03-11 12:32:50 +00:00
parent e050704c2c
commit b21c5fc98f
4 changed files with 20 additions and 10 deletions

View file

@ -201,10 +201,9 @@ def handle_incoming_follow(activity):
user = get_or_create_remote_user(activity['actor'])
# TODO: allow users to manually approve requests
try:
models.UserRelationship.objects.create(
models.UserFollowRequest.objects.create(
user_subject=user,
user_object=to_follow,
status='follow_request',
relationship_id=activity['id']
)
except django.db.utils.IntegrityError: