 
 ; GETTERS
 
+; used in handlers/extract-user-ids
+
 (defn all-users []
   (vals (get-in @app-state [:users])))
 
-(defn users-in-group [group-id]
-  (filter (fn [u] (contains? (set (u :group-ids)) group-id)) (vals (@app-state :users))))
-
-(defn users-in-open-group []
-  (users-in-group (@app-state :open-group-id)))
-
 (defn user-in-open-group? [user-id]
   (contains? (set (get-in @app-state [:users user-id :group-ids])) (@app-state :open-group-id)))
+
+; use in handlers/identify-mentions
 
 (defn nickname->user [nickname]
   (->> (get-in @app-state [:users])

         first
         :id)))

(defn get-tag [tag-id]
  (get-in @app-state [:tags tag-id]))

(defn is-subscribed-to-tag? [tag-id]
  (contains? (get-in @app-state [:user :subscribed-tag-ids]) tag-id))

(defn open-group-name []
  (let [st @app-state]
    (get-in st [:groups (st :open-group-id) :name])))

(defn id->group [group-id]
  (get-in @app-state [:groups group-id]))

(defn bots-in-open-group []
  (get-in @app-state [:groups (get @app-state :open-group-id) :bots]))

(defn open-group-id []
  (get @app-state :open-group-id))

       ; nicknames are unique, so take the first
       first))

; used in handlers/extract-tag-ids

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