Skip to content

Commit

Permalink
only show Correlation context element if there are entiites in message (
Browse files Browse the repository at this point in the history
  • Loading branch information
wssheldon authored Mar 11, 2023
1 parent f7177bc commit 97d378e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/dispatch/plugins/dispatch_slack/case/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,10 @@ def create_signal_messages(case: Case, channel_id: str, db_session: Session) ->
)
signal_metadata_blocks.append(Divider())

signal_metadata_blocks.append(
Context(elements=["Correlation is based on two weeks of signal data."]),
)
if instance.entities:
signal_metadata_blocks.append(
Context(elements=["Correlation is based on two weeks of signal data."]),
)

messages.append(Message(blocks=signal_metadata_blocks[:50]).build()["blocks"])
return messages

0 comments on commit 97d378e

Please sign in to comment.