Skip to content

Commit

Permalink
add footer_text in slack template
Browse files Browse the repository at this point in the history
  • Loading branch information
edulauer committed Jun 21, 2024
1 parent 668e73a commit e13f2d6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/notification/slack_sender.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ def __init__(self, specs) -> None:
self.blocks = []
self.hide_filters = specs.hide_filters
self.header_text = specs.header_text
self.footer_text = specs.footer_text

def send(self, search_report: list, report_date: str = None):
"""Parse the content, and send message to Slack"""
Expand All @@ -38,6 +39,10 @@ def send(self, search_report: list, report_date: str = None):
self._add_text(
"Nenhum dos termos pesquisados foi encontrado nesta consulta."
)

if self.footer_text:
footer_text = _remove_html_tags(self.footer_text)
self._add_header(footer_text)
self._flush()

def _add_header(self, text):
Expand Down

0 comments on commit e13f2d6

Please sign in to comment.