-;; Hack to get around circular dependency
 (ns pc.http.datomic2
   (:require [clojure.core.async :as async]
             [clojure.tools.logging :as log]

    [type e a server-timestamp]
    transaction))

;; TODO: teach the frontend how to lookup cust/name from cust/uuid
(defn chat-cust-name? [[type e a v :as transaction]]
  (= a :chat/cust-name))

;; TODO: only let creators mark things as private
;; TODO: only let people on the white list make things as private

                            (map (partial coerce-floats float-attrs))
                            (map (partial coerce-uuids uuid-attrs))
                            (map (partial coerce-server-timestamp server-timestamp))
                            (filter whitelisted?)
                            (concat [(merge {:db/id txid :document/id document-id :session/uuid session-uuid}
                                            (when cust-uuid {:cust/uuid cust-uuid}))])
                            (d/transact conn)
