Prevent ability to add yourself as a friend

This commit is contained in:
Mai 2020-08-03 00:24:29 +00:00 committed by Luna
parent 1a28fbdf36
commit f9cff687ee
1 changed files with 3 additions and 0 deletions

View File

@ -228,6 +228,9 @@ async def post_relationship():
if not uid:
raise RelationshipFailed("No users with DiscordTag exist")
if uid == user_id:
raise RelationshipFailed("Tried to add themselves as friend")
res = await make_friend(user_id, uid)
if res is None: