Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7ab973a03b | |||
| 1889ffeeee | |||
| df661762a9 |
@@ -54,6 +54,7 @@ public struct Action {
|
||||
dict["text"] = text
|
||||
dict["type"] = type
|
||||
dict["value"] = value
|
||||
dict["style"] = style?.rawValue
|
||||
dict["confirm"] = confirm?.dictionary()
|
||||
return dict
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ public struct Response {
|
||||
var json = [String : AnyObject]()
|
||||
json["text"] = text
|
||||
json["response_type"] = responseType?.rawValue
|
||||
json["attachments"] = attachments?.flatMap({$0.dictionary()})
|
||||
json["attachments"] = attachments?.map({$0.dictionary()})
|
||||
return json
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,9 @@ public final class SlackKit: OAuthDelegate {
|
||||
public init(withAPIToken token: String, clientOptions: ClientOptions = ClientOptions()) {
|
||||
self.clientOptions = clientOptions
|
||||
let client = Client(apiToken: token)
|
||||
self.onClientInitalization?(client)
|
||||
dispatch_async(dispatch_get_main_queue(), {
|
||||
self.onClientInitalization?(client)
|
||||
})
|
||||
clients[token] = client
|
||||
client.connect(options: self.clientOptions)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user