From acbd30c5ac6dbfc87e47657909d276a8cf720753 Mon Sep 17 00:00:00 2001 From: andyksaw Date: Tue, 5 May 2020 13:41:10 +0900 Subject: [PATCH] Support specifying thread_ts when uploading files --- SKWebAPI/Sources/WebAPI.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SKWebAPI/Sources/WebAPI.swift b/SKWebAPI/Sources/WebAPI.swift index 78eef71..52be43c 100755 --- a/SKWebAPI/Sources/WebAPI.swift +++ b/SKWebAPI/Sources/WebAPI.swift @@ -495,6 +495,7 @@ extension WebAPI { title: String? = nil, initialComment: String? = nil, channels: [String]? = nil, + ts: String? = nil, success: FileClosure?, failure: FailureClosure? ) { @@ -504,7 +505,8 @@ extension WebAPI { "filetype": filetype, "title": title, "initial_comment": initialComment, - "channels": channels?.joined(separator: ",") + "channels": channels?.joined(separator: ","), + "thread_ts": ts ] networkInterface.uploadRequest(data: file, parameters: parameters, successClosure: {(response) in success?(File(file: response["file"] as? [String: Any]))