fix(slack): skip thread_ts for direct messages
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user