Skip to content

Commit

Permalink
Minor improvements to case and signal slack messages (#3157)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevgliss authored Mar 24, 2023
1 parent dc9b30b commit 60646ff
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/dispatch/plugins/dispatch_slack/case/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

def create_case_message(case: Case, channel_id: str):
blocks = [
Context(elements=["*Case Details*"]),
Context(elements=[f"* {case.name} - Case Details*"]),
Section(
text=f"*Title* \n {case.title}.",
accessory=Button(
Expand All @@ -26,9 +26,7 @@ def create_case_message(case: Case, channel_id: str):
url=f"{DISPATCH_UI_URL}/{case.project.organization.slug}/cases/{case.name}",
),
),
Section(
text=f"*Description* \n {case.description} \n \n Additional information is available in the <{case.case_document.weblink}|case document>."
),
Section(text=f"*Description* \n {case.description}"),
Section(
fields=[
f"*Assignee* \n {case.assignee.individual.email}",
Expand Down Expand Up @@ -145,7 +143,7 @@ def create_signal_messages(case: Case, channel_id: str, db_session: Session) ->
Actions(
elements=[
Button(
text="View Raw Data",
text="Raw Data",
action_id=SignalNotificationActions.view,
value=button_metadata,
),
Expand All @@ -154,6 +152,11 @@ def create_signal_messages(case: Case, channel_id: str, db_session: Session) ->
action_id=SignalNotificationActions.snooze,
value=button_metadata,
),
Button(
text="Response Plan",
action_id="button-link",
url=instance.signal.external_url,
),
]
),
Section(text="*Entities*"),
Expand Down

0 comments on commit 60646ff

Please sign in to comment.