mirror of https://gitlab.com/litecord/litecord.git
Merge branch 'patch-2' into 'master'
Prevent ability to add yourself as a friend See merge request litecord/litecord!65
This commit is contained in:
commit
3dc289d90f
|
|
@ -228,6 +228,9 @@ async def post_relationship():
|
||||||
if not uid:
|
if not uid:
|
||||||
raise RelationshipFailed("No users with DiscordTag exist")
|
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)
|
res = await make_friend(user_id, uid)
|
||||||
|
|
||||||
if res is None:
|
if res is None:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue