   :stop (router))
 
 (defmethod event-msg-handler :default
-  [{:as ev-msg :keys [event id ?data ring-req ?reply-fn send-fn]}]
+  [{:as ev-msg :keys [event id ?data ring-req ?reply-fn send-fn user-id]}]
   (let [session (:session ring-req)
         uid     (:uid     session)]
     (debugf "Unhandled event: %s" event)

        (?reply-fn {:threads threads :thread-ids thread-ids})))))

(defmethod event-msg-handler :chat/load-threads
  [{:as ev-msg :keys [event id ?data ring-req ?reply-fn send-fn user-id]}]
  (let [user-tags (db/tag-ids-for-user user-id)
        filter-tags (fn [t] (update-in t [:tag-ids] (partial into #{} (filter user-tags))))
        thread-ids (filter (partial db/user-can-see-thread? user-id) ?data)

                  user-id (?data :name) (?data :group-id))))

(defmethod event-msg-handler :chat/set-tag-description
  [{:as ev-msg :keys [?data ?reply-fn user-id]}]
  (let [{:keys [tag-id description]} ?data]
    (when (and tag-id description)
      (let [group-id (db/tag-group-id tag-id)]
