                        :tag/description description]]))
 
 (defn create-extension!
-  [{:keys [id type group-id user-id config]}]
-  (-> {:extension/group [:group/id group-id]
+  [conn {:keys [id type group-id user-id config]}]
+  (->> {:extension/group [:group/id group-id]
        :extension/user [:user/id user-id]
        :extension/type type
        :extension/id id
        :extension/config (pr-str config)}
-      create-entity!
+      (create-entity! conn)
       db->extension))
 
 (defn retract-extension!

    conn
    [[:db/retract [:user/id user-id] :user/open-thread [:thread/id thread-id]]]))

(defn create-tag! [attrs]
  (-> {:tag/id (attrs :id)
       :tag/name (attrs :name)
       :tag/group [:group/id (attrs :group-id)]}
      create-entity!
      db->tag))

(defn tag-group-id [conn tag-id]

                               :type (:extension/type x)})
                      (:extension/_group e))}))

(defn- create-entity!
  "create entity with attrs, return entity"
  [conn attrs]
  (let [new-id (d/tempid :entities)
        {:keys [db-after tempids]} @(d/transact conn
                                                [(assoc attrs :db/id new-id)])]
