Spaces:
Paused
Paused
Update app.py
Browse files
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}')\
|
| 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']}")
|