Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -93,17 +93,17 @@ async def on_thread_create(thread):
|
|
| 93 |
SLACK_CHANNEL_ID,
|
| 94 |
f"New forum thread started in #ask-for-help by {thread.owner}: *{thread.name}*\n"
|
| 95 |
f"{thread.jump_url}",
|
| 96 |
-
thread.
|
| 97 |
)
|
| 98 |
if slack_thread_ts:
|
| 99 |
thread_mapping[discord_thread_id] = slack_thread_ts
|
| 100 |
|
| 101 |
|
| 102 |
-
def post_to_slack_forum_version(channel, text,
|
| 103 |
try:
|
| 104 |
response = slack_client.chat_postMessage(
|
| 105 |
channel=channel,
|
| 106 |
-
text=
|
| 107 |
thread_ts=thread_ts
|
| 108 |
)
|
| 109 |
return response['ts'] # Return the Slack message timestamp (thread ID)
|
|
|
|
| 93 |
SLACK_CHANNEL_ID,
|
| 94 |
f"New forum thread started in #ask-for-help by {thread.owner}: *{thread.name}*\n"
|
| 95 |
f"{thread.jump_url}",
|
| 96 |
+
thread.owner
|
| 97 |
)
|
| 98 |
if slack_thread_ts:
|
| 99 |
thread_mapping[discord_thread_id] = slack_thread_ts
|
| 100 |
|
| 101 |
|
| 102 |
+
def post_to_slack_forum_version(channel, text, thread_owner, thread_ts=None):
|
| 103 |
try:
|
| 104 |
response = slack_client.chat_postMessage(
|
| 105 |
channel=channel,
|
| 106 |
+
text=thread_owner + ": " + text,
|
| 107 |
thread_ts=thread_ts
|
| 108 |
)
|
| 109 |
return response['ts'] # Return the Slack message timestamp (thread ID)
|