Compare commits

...

2 Commits

Author SHA1 Message Date
Peter Zignego 987be40c91 Fix callback bug when authing via a token 2016-07-26 19:07:53 -04:00
Peter Zignego 2e71ac6876 Bug fix 2016-07-23 11:12:14 -04:00
2 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -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
}
+3 -1
View File
@@ -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)
DispatchQueue.main.async(execute: {
self.onClientInitalization?(client)
})
clients[token] = client
client.connect(options: self.clientOptions)
}