diff --git a/SlackKit/Sources/SlackKit.swift b/SlackKit/Sources/SlackKit.swift index c14fc68..fd3678f 100644 --- a/SlackKit/Sources/SlackKit.swift +++ b/SlackKit/Sources/SlackKit.swift @@ -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) }