     (when-not (= first-msg {"type" "hello"})
       (throw (ex-info "Unable to connect" first-msg)))
     (keep-alive conn)
-    (route-messages conn incoming-messages)
+
     conn))
 
 (defn connect [token]

                          (json/generate-string {:id (rand-int 1e6)
                                                 :type "ping"})))))

(defn route-messages [ws-conn incoming-messages]
  (future (while true
            (let [msg (json/parse-string @(stream/take! ws-conn) true)]
              (condp = (:type msg)
                "message" (do (println "OK")
                              (async/put! incoming-messages msg))
                (do #_ignore))))))

(defn websocket-client [url incoming-messages]

                      (json/parse-string true))
        incoming-messages (async/chan)
        ws-conn (websocket-client (:url conn-data)
                                  incoming-messages)
        conn (assoc conn-data
                    :ws-conn ws-conn
                    :incoming-messages incoming-messages)]
    (route-messages conn incoming-messages)
    conn))

(defn find-user-dm-id [conn user]
  (let [user-id (some #(if (= (:name %) user)
