friends fix for temporary sessions

This commit is contained in:
Jonas Weinz 2019-04-04 16:36:37 +02:00
parent 8c26f48911
commit cc18422368

View File

@ -585,6 +585,9 @@ class ConnectionHandler(object):
# check for user:
if valid_name(friend):
if not conn.is_registered_user:
success = False
msg = "you cannot have friends without an account"
if friend in self.user_manager.get_friends_for_user(conn.user_name):
success = False
msg = f"'{friend}' is already your friend"