Skip to content

Commit

Permalink
hotfix to truncate message if too long
Browse files Browse the repository at this point in the history
  • Loading branch information
evanpetzoldt committed Aug 12, 2024
1 parent dab20d5 commit 2513cbd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions slackblast/features/backblast.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,16 +473,18 @@ def handle_backblast_post(body: dict, client: WebClient, logger: Logger, context

if create_or_edit == "create":
if region_record.paxminer_schema is None:
text = (post_msg + "\n" + moleskin_text)[:3000]
res = client.chat_postMessage(
channel=chan,
text=post_msg + "\n" + moleskin_text,
text=text,
username=f"{q_name} (via Slackblast)",
icon_url=q_url,
)
else:
text = (f"{moleskin_text_w_names}\n\nUse the 'New Backblast' button to create a new backblast")[:3000]
res = client.chat_postMessage(
channel=chan,
text=f"{moleskin_text_w_names}\n\nUse the 'New Backblast' button to create a new backblast",
text=text,
username=f"{q_name} (via Slackblast)",
icon_url=q_url,
blocks=blocks,
Expand Down

0 comments on commit 2513cbd

Please sign in to comment.