Skip to content

Commit

Permalink
Revert "Remove snippet from art-attention"
Browse files Browse the repository at this point in the history
  • Loading branch information
locriandev authored Jun 10, 2024
1 parent dc9fdcf commit 87c3db3
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,13 @@ def main():
age_type = 'days'

age = int(age)
# Block builder: https://app.slack.com/block-kit-builder/T04714LEPHA#%7B%22blocks%22:%5B%5D%7D
snippet = ' '.join(text.split(' ')[0:30])
# Slack includes an arrow character in the text if should be replaced by rich text elements (e.g. a n@username).
# We just remove them since we are just trying for a short summary.
snippet = snippet.replace('\ue006', '...')
response_messages.append(
f"*Channel:* {channel_handle}\n*Date:* {str_date}Z\n*Age:* {age} {age_type}\n*Message:* <{permalink}|Link>")
f"*Channel:* {channel_handle}\n*Date:* {str_date}Z\n*Age:* {age} {age_type}\n*Message:* <{permalink}|Link>\n*Snippet:* {snippet}...")

header_block = [
{
Expand Down

0 comments on commit 87c3db3

Please sign in to comment.