lunarflu HF staff commited on
Commit
9e52f3a
·
verified ·
1 Parent(s): d448043

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -49,10 +49,9 @@ async def on_message(message):
49
 
50
  async def post_to_slack(author, content, channel, url, slack_mention, trigger):
51
  try:
52
- message_link = f"[#{channel}]({url})"
53
  response = slack_client.chat_postMessage(
54
  channel=SLACK_CHANNEL_ID,
55
- text=f"{slack_mention} (for the keyword -> '{trigger}')\n|{message_link} |{author}: {content}"
56
  )
57
  except SlackApiError as e:
58
  print(f"Error posting to Slack: {e.response['error']}")
 
49
 
50
  async def post_to_slack(author, content, channel, url, slack_mention, trigger):
51
  try:
 
52
  response = slack_client.chat_postMessage(
53
  channel=SLACK_CHANNEL_ID,
54
+ text=f"{slack_mention} (for the keyword -> '{trigger}')\nFrom {author} in channel #{channel}: {content}\n{url}"
55
  )
56
  except SlackApiError as e:
57
  print(f"Error posting to Slack: {e.response['error']}")