Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

only show Correlation context element if there are entities in message #3100

Merged
merged 1 commit into from
Mar 11, 2023
Merged
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
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