diff --git a/src/dispatch/plugins/dispatch_slack/case/messages.py b/src/dispatch/plugins/dispatch_slack/case/messages.py index 66db3476d8b2..49807e7222eb 100644 --- a/src/dispatch/plugins/dispatch_slack/case/messages.py +++ b/src/dispatch/plugins/dispatch_slack/case/messages.py @@ -182,9 +182,12 @@ def create_signal_messages(case: Case) -> List[Message]: Section(fields=[f"*{k.strip()}* \n {v.strip()}" for k, v in chunk]), ) else: - signal_metadata_blocks.append( - Section(text=item["value"]), - ) - messages.append(Message(blocks=signal_metadata_blocks).build()["blocks"]) + # remove empty strings + if item["value"]: + signal_metadata_blocks.append( + Section(text=str(item["value"]).strip()), + ) + # limit the number of total messages + messages.append(Message(blocks=signal_metadata_blocks[:50]).build()["blocks"]) return messages