This commit is contained in:
Aevann1 2022-04-07 00:37:25 +02:00
parent d0a2abe451
commit fc3bb77171
4 changed files with 13 additions and 5 deletions

View file

@ -1023,7 +1023,10 @@ def unfollow_user(username, v):
target = get_user(username)
if target.fish: return {"error": "You can't unfollow this user!"}
if target.fish:
send_repeatable_notification(target.id, f"@{v.username} has tried to unfollow you and failed because of your fish award!")
g.db.commit()
return {"error": "You can't unfollow this user!"}
follow = g.db.query(Follow).filter_by(user_id=v.id, target_id=target.id).one_or_none()