Skip to content

Commit

Permalink
Fixes issue where ephemeral welcome message was sent every time someo…
Browse files Browse the repository at this point in the history
…ne is @ mentioned (#4966)
  • Loading branch information
whitdog47 authored Jul 16, 2024
1 parent 22f99c3 commit cbd5695
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/dispatch/plugins/dispatch_slack/case/interactive.py
Original file line number Diff line number Diff line change
Expand Up @@ -957,6 +957,14 @@ def handle_new_participant_added(
case: Case = context["subject"]
user_email = get_user_email(client=client, user_id=user_id)

# check if user is already a participant
participant = participant_service.get_by_case_id_and_email(
db_session=db_session, case_id=case.id, email=user_email
)

if participant and participant.active_roles:
continue

participant = case_flows.case_add_or_reactivate_participant_flow(
case_id=case.id,
user_email=user_email,
Expand Down

0 comments on commit cbd5695

Please sign in to comment.