File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import type { Logger } from '@slack/logger';
55
66import { ErrorCode , errorWithCode } from './errors' ;
77import type {
8+ FileThreadDestinationArgument ,
89 FileUploadV2 ,
910 FileUploadV2Job ,
1011 FilesCompleteUploadExternalArguments ,
@@ -240,8 +241,15 @@ export function getAllFileUploadsToComplete(
240241 channel_id,
241242 initial_comment,
242243 } ;
243- if ( thread_ts ) {
244- toComplete [ compareString ] . thread_ts = upload . thread_ts ;
244+ if ( thread_ts && channel_id ) {
245+ const fileDestinationArgument : FileThreadDestinationArgument = {
246+ channel_id,
247+ thread_ts : upload . thread_ts ,
248+ }
249+ toComplete [ compareString ] = {
250+ ...toComplete [ compareString ] ,
251+ ...fileDestinationArgument
252+ } ;
245253 }
246254 if ( 'token' in upload ) {
247255 toComplete [ compareString ] . token = upload . token ;
You can’t perform that action at this time.
0 commit comments