fix(slack): define thread usage when sending messages

This commit is contained in:
ailuntz
2026-03-10 00:14:34 +08:00
parent f19cefb1b9
commit 620d7896c7
2 changed files with 89 additions and 1 deletions

View File

@@ -82,6 +82,7 @@ class SlackChannel(BaseChannel):
thread_ts = slack_meta.get("thread_ts")
channel_type = slack_meta.get("channel_type")
# Only reply in thread for channel/group messages; DMs don't use threads
use_thread = bool(thread_ts and channel_type != "im")
thread_ts_param = thread_ts if use_thread else None
# Slack rejects empty text payloads. Keep media-only messages media-only,
@@ -278,4 +279,3 @@ class SlackChannel(BaseChannel):
if parts:
rows.append(" · ".join(parts))
return "\n".join(rows)