mirror of https://gitlab.com/litecord/litecord.git
Prevent ability to add yourself as a friend
This commit is contained in:
parent
1a28fbdf36
commit
f9cff687ee
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in New Issue