          (into #{}))))
 
 (defn threads-with-tag
-  "Find threads with a given tag that the user is allowed to see, ordered by most recent message.
+  "Find threads with a given tag that the user is allowed to see, ordered by
+  most recent message.
   Paginates results, dropping `skip` threads and returning `limit`.
   Returns the threads and a count of how many threads remain."
   [conn user-id tag-id skip limit]

                       db->group)]
    (when (:public? (group-settings (group :id)))
      group)))


                         (map first)
                         (drop skip)
                         (take limit))]
    {:threads (into ()
                    (comp (map db->thread)
                          (filter #(user-can-see-thread? user-id (% :id))))
                    (d/pull-many (d/db conn) thread-pull-pattern thread-eids))
     :remaining (- (count all-thread-eids) (+ skip (count thread-eids)))}))

(defn tag-set-description!
  [conn tag-id description]
  (d/transact conn [[:db/add [:tag/id tag-id]
                     :tag/description description]]))

(defn create-extension!
  [conn {:keys [id type group-id user-id config]}]
