Skip to content

Commit

Permalink
Add timezone in User object
Browse files Browse the repository at this point in the history
  • Loading branch information
lepisma committed Nov 30, 2023
1 parent 6c63a72 commit 2a857ce
Show file tree
Hide file tree
Showing 4 changed files with 531 additions and 295 deletions.
4 changes: 2 additions & 2 deletions ccb/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def load_users_from_user_group(client: slack.WebClient, user_group: str) -> List
users = []
for i in tqdm(user_ids, desc=f"Collecting user info for group {user_group}"):
u = client.users_info(user=i)["user"]
users.append(User(u["id"], u["real_name"]))
users.append(User(u["id"], u["real_name"], u["tz"]))

return users

Expand All @@ -41,7 +41,7 @@ def load_users(client: slack.WebClient) -> List[User]:
continue
if member["id"] == "USLACKBOT":
continue
users.append(User(member["id"], member["real_name"]))
users.append(User(member["id"], member["real_name"], u["tz"]))
return users


Expand Down
1 change: 1 addition & 0 deletions ccb/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
class User:
id: str
name: str
tz: str
Loading

0 comments on commit 2a857ce

Please sign in to comment.