Skip to content

Commit 19b1774

Browse files
authored
[Bug] moved participant lookup (Netflix#4581)
Moved participant lookup to occur only if it is not archived because the participants will only be added if it is not archived.
1 parent 9b172e0 commit 19b1774

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/dispatch/plugins/dispatch_slack/plugin.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -273,12 +273,11 @@ def send_ephemeral(
273273
send_ephemeral_message(client, conversation_id, user_id, text, blocks)
274274

275275
def add(self, conversation_id: str, participants: List[str]):
276-
"""Adds users to conversation."""
276+
"""Adds users to conversation if it is not archived."""
277277
client = create_slack_client(self.configuration)
278-
participants = [resolve_user(client, p)["id"] for p in set(participants)]
279-
280278
archived = conversation_archived(client, conversation_id)
281279
if not archived:
280+
participants = [resolve_user(client, p)["id"] for p in set(participants)]
282281
add_users_to_conversation(client, conversation_id, participants)
283282

284283
def add_to_thread(self, conversation_id: str, thread_id: str, participants: List[str]):

0 commit comments

Comments
 (0)