 (reg-event-fx
   :set-window-visibility
   (fn [{state :db :as cofx} [_ visible?]]
-    (merge
-      {:db (helpers/set-window-visibility state visible?)}
-      (when visible?
-        {:window-title "Chat"}))))
+    {:db (helpers/set-window-visibility state visible?)
+     :window-title (when visible? "Chat")}))
 
 (reg-event-fx
   :auth

(reg-event-fx
  :make-admin
  (fn [{state :db :as cofx} [_ {:keys [group-id user-id local-only?] :as args}]]
    (merge
      {:db (helpers/make-user-admin state user-id group-id)}
      (when-not local-only?
        {:websocket-send (list [:braid.server/make-user-admin args])}))))

(reg-event-fx
  :remove-from-group

            [braid.client.quests.helpers :as quest-helpers]))

; TODO: handle callbacks declaratively too?
(reg-fx :websocket-send (fn [args] (when args (apply sync/chsk-send! args))))

; TODO: handle callbacks declaratively too?
(reg-fx :edn-xhr (fn [args] (edn-xhr args)))

(reg-fx :redirect-to (fn [route] (when route (router/go-to route))))

(reg-fx :window-title (fn [title] (when title (set! (.-title js/document) title))))

(defn name->open-tag-id
  "Lookup tag by name in the open group"
