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

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

; TODO: handle callbacks declaratively too?
(reg-fx :websocket-send (fn [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] (router/go-to route)))

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

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

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

(reg-event-fx
  :reopen-thread
