rocketchat: Handle users with no email address set.

Fixes: #25596.
This commit is contained in:
Alex Vandiver 2023-05-16 20:37:27 +00:00 committed by Tim Abbott
parent 3160c3cce0
commit 34394cec9a
1 changed files with 8 additions and 8 deletions

View File

@ -79,14 +79,14 @@ def process_users(
else:
is_mirror_dummy = True
if not user_dict.get("emails"):
user_dict["emails"] = [
{
"address": "{}-{}@{}".format(
user_dict["username"], user_dict["type"], domain_name
)
}
]
if user_dict.get("emails") is None:
user_dict["emails"] = [
{
"address": "{}-{}@{}".format(
user_dict["username"], user_dict["type"], domain_name
)
}
]
# TODO: Change this to use actual exported avatar
avatar_source = "G"