mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
Only accept Undo/Follow if original Follow was accepted
This commit is contained in:
parent
d2a99e08b4
commit
15507efd73
1 changed files with 1 additions and 1 deletions
|
@ -1283,7 +1283,7 @@ def process_user_undo_follow_request(request_json, activitypublog_id, remote_use
|
|||
local_user = find_actor_or_create(local_user_ap_id, create_if_not_found=False)
|
||||
remote_user = User.query.get(remote_user_id)
|
||||
if local_user:
|
||||
db.session.query(UserFollower).filter_by(local_user_id=local_user.id, remote_user_id=remote_user.id).delete()
|
||||
db.session.query(UserFollower).filter_by(local_user_id=local_user.id, remote_user_id=remote_user.id, is_accepted=True).delete()
|
||||
activity_log.result = 'success'
|
||||
db.session.commit()
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue