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

@ -709,7 +709,10 @@ def settings_block_user(v):
if not user: return {"error": "That user doesn't exist."}, 404
if user.unblockable: return {"error": "This user is unblockable."}, 403
if user.unblockable:
send_repeatable_notification(user.id, f"@{v.username} has tried to block you and failed because of your unblockable status!")
g.db.commit()
return {"error": "This user is unblockable."}, 403
if user.id == v.id:
return {"error": "You can't block yourself."}, 409