From 959936681240d340c4e44658c238e7754c2facfe Mon Sep 17 00:00:00 2001 From: Someone Date: Sat, 1 Apr 2023 23:41:47 +0200 Subject: [PATCH] modules/WSOnboarding.py --- modules/WSOnboarding.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/modules/WSOnboarding.py b/modules/WSOnboarding.py index 9e21312..dbed272 100644 --- a/modules/WSOnboarding.py +++ b/modules/WSOnboarding.py @@ -23,16 +23,14 @@ class WSOnboarding(AbstractWSHandler): if not "system_guest" in user["roles"]: for team_id, chan_ids in self.user_teams_and_channels.items(): - for chan_id, excluded_user_ids in chan_ids.items(): - if not user["id"] in excluded_user_ids: - self.bot.api.add_user_to_team(team_id, user["id"], exc=False) - self.bot.api.add_user_to_channel(chan_id, user["id"], exc=False) + for chan_id in chan_ids: + self.bot.api.add_user_to_team(team_id, user["id"], exc=False) + self.bot.api.add_user_to_channel(chan_id, user["id"], exc=False) else: for team_id, chan_ids in self.guest_teams_and_channels.items(): - for chan_id, excluded_user_ids in chan_ids.items(): - if not user["id"] in excluded_user_ids: - self.bot.api.add_user_to_team(team_id, user["id"], exc=False) - self.bot.api.add_user_to_channel(chan_id, user["id"], exc=False) + for chan_id in chan_ids: + self.bot.api.add_user_to_team(team_id, user["id"], exc=False) + self.bot.api.add_user_to_channel(chan_id, user["id"], exc=False) chan = self.bot.api.create_dm_channel_with(data['data']['user_id']) -- 2.43.0