fix(slack): skip thread_ts for direct messages

This commit is contained in:
Re-bin
2026-03-09 17:18:10 +00:00
parent 757921fb27
commit 28330940d0
2 changed files with 4 additions and 3 deletions

View File

@@ -81,9 +81,8 @@ class SlackChannel(BaseChannel):
slack_meta = msg.metadata.get("slack", {}) if msg.metadata else {}
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 DMs don't use threads; channel/group replies may keep thread_ts.
thread_ts_param = thread_ts if thread_ts and channel_type != "im" else None
# Slack rejects empty text payloads. Keep media-only messages media-only,
# but send a single blank message when the bot has no text or files to send.