                        KeyCodes.ENTER
                        (do
                          (dispatch [:new-message {:group-id @group-id
-                                                  :thread-id thread-id
+                                                  :thread-id (config :thread-id)
                                                   :content @message}])
 
                          (reset! message ""))

                                    (dispatch [:hide-thread {:thread-id (thread :id)}]))}])]]

       [messages-view thread]
       [new-message-view (thread :id)]])))

(defn header-view []
  (let [group-id (subscribe [:open-group-id])]

            [retouch.core :refer [drawer-view swipe-view]])
  (:import [goog.events KeyCodes]))

(defn new-message-view [config]
  (let [message (r/atom "")
        group-id (subscribe [:open-group-id])]
    (fn [config]
      [:div.new.message
       [upload-button-view {:thread-id (config :thread-id)
                            :group-id @group-id}]
       [:textarea {:value @message
                   :placeholder (config :placeholder)
                   :on-change
                   (fn [e]
                     (reset! message (.. e -target -value)))
