yuseok89 commented on code in PR #63523:
URL: https://github.com/apache/airflow/pull/63523#discussion_r2935302386


##########
providers/slack/src/airflow/providers/slack/hooks/slack.py:
##########
@@ -310,6 +310,12 @@ def send_file_v1_to_v2(
         else:
             channels_to_share = [None]
 
+        if thread_ts is not None and len(channels_to_share) > 1:
+            raise ValueError(
+                "thread_ts cannot be used with multiple channels. "
+                "A thread belongs to a single channel; specify exactly one 
channel when replying in a thread."
+            )

Review Comment:
   Good question. I'll cover both angles:
   
   1. If you meant how to send a DM: You can pass a user ID as the channel 
value and Slack will open the DM automatically. This is documented in the Slack 
docs. <img width="1143" height="241" alt="image" 
src="https://github.com/user-attachments/assets/cb024d9b-a36c-4016-abb8-02d6f70a9788";
 />
   2. If you meant whether we should treat DM differently: The restriction 
should apply to both channels and DMs. A thread always belongs to a single 
conversation, whether it's a public channel, private channel, or DM. The 
`thread_ts` value is tied to a message in that one conversation. For DM threads 
you pass a single DM channel ID in channels, and for channel threads you pass a 
single channel ID. In both cases, multiple values in channels would be invalid 
because a thread cannot span multiple conversations.
   
   Let me know if you have any other questions or suggestions.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to