Update follow and unfollow to use UserFollowRequest & UserFollows.
This commit is contained in:
parent
e050704c2c
commit
b21c5fc98f
4 changed files with 20 additions and 10 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue