rocketchat: Treat users with "bot" roles as bots when importing.

We previously relied on `type`, but we have observed bots typed with a
`bot` role as well.
This commit is contained in:
Alex Vandiver 2023-05-16 20:41:57 +00:00 committed by Tim Abbott
parent 34394cec9a
commit 724de9cd49
1 changed files with 2 additions and 0 deletions

View File

@ -104,6 +104,8 @@ def process_users(
realm_owners.append(id)
elif "guest" in user_dict["roles"]:
role = UserProfile.ROLE_GUEST
elif "bot" in user_dict["roles"]:
is_bot = True
if is_bot:
bots.append(id)