Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions nephthys/events/channel_left.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ async def channel_left(ack: AsyncAck, event: dict, client: AsyncWebClient):

users = await client.usergroups_users_list(usergroup=env.slack_user_group)
new_users = users.get("users", [])

try:
new_users.remove(user_id)
except ValueError:
return
return

await client.usergroups_users_update(
usergroup=env.slack_user_group, users=new_users
)
Expand Down
2 changes: 1 addition & 1 deletion nephthys/macros/hello_world.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ async def run(self, ticket, helper, **kwargs):
text=f"hey, {name}! i'm heidi :rac_shy: say hi to orpheus for me would you? :rac_cute:",
channel=env.slack_help_channel,
thread_ts=ticket.msgTs,
)
)
2 changes: 1 addition & 1 deletion nephthys/macros/resolve.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ async def run(self, ticket: Ticket, helper: User, **kwargs) -> None:
f"Ticket with ts {ticket.msgTs} is already closed. No action taken. (Trying to resolve for <@{helper.slackId}>).",
messages=[f"Ticket ID: {ticket.id}", f"Helper ID: {helper.id}"],
)
return
return
2 changes: 1 addition & 1 deletion nephthys/macros/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ async def run(self, ticket: Ticket, helper: User, **kwargs) -> None:
"""
Run the macro with the given arguments.
"""
raise NotImplementedError("Subclasses must implement this method.")
raise NotImplementedError("Subclasses must implement this method.")
4 changes: 3 additions & 1 deletion nephthys/tasks/update_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ async def update_helpers():
)

# create new users not in the db
existing_users_in_db = await env.db.user.find_many(where={"slackId": {"in": team_ids}})
existing_users_in_db = await env.db.user.find_many(
where={"slackId": {"in": team_ids}}
)
existing_user_ids_in_db = {user.slackId for user in existing_users_in_db}

new_member_data_to_create = []
Expand Down
8 changes: 3 additions & 5 deletions nephthys/views/home/tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,9 @@ async def get_manage_tags_view(user: User) -> dict:
)
if tag.userSubscriptions:
subIds = [user.userId for user in tag.userSubscriptions]

subUsers = await env.db.user.find_many(
where={"id": {"in": subIds}}
)


subUsers = await env.db.user.find_many(where={"id": {"in": subIds}})

subs = [user.slackId for user in subUsers]
else:
subs = []
Expand Down