forked from rDrama/rDrama
1
0
Fork 0

make the unblockable and fish notifs actually get sent

master
Aevann 2023-06-24 20:34:07 +03:00
parent 7cac2c19a1
commit 5fe6c599df
2 changed files with 2 additions and 0 deletions

View File

@ -668,6 +668,7 @@ def settings_block_user(v):
if user.unblockable:
if not v.shadowbanned:
send_notification(user.id, f"@{v.username} has tried to block you and failed because of your unblockable status!")
g.db.commit()
abort(403, f"@{user.username} is unblockable!")
if user.id == v.id: abort(400, "You can't block yourself")

View File

@ -1134,6 +1134,7 @@ def unfollow_user(username, v):
if target.fish:
if not v.shadowbanned:
send_notification(target.id, f"@{v.username} has tried to unfollow you and failed because of your fish award!")
g.db.commit()
abort(400, f"You can't unfollow @{target.username}")
follow = g.db.query(Follow).filter_by(user_id=v.id, target_id=target.id).one_or_none()