                                deref
                                :tx-data
                                (filter (partial public? db))
-                               (map datom-read-api)))}}))
+                               (map (partial datom-read-api db))))}}))
 
 (defn get-annotations [transaction]
   (let [txid (-> transaction :tx-data first :tx)]

  [db datom]
  (->> datom :e (d/entity db) :dummy (= :dummy/dummy)))

(defn datom-read-api [datom]
  (let [{:keys [e a v tx added] :as d} datom]
    {:e e :a a :v v :tx tx :added added}))

;; TODO: annotate transaction with session and document information

      (when-let [public-datoms (->> transaction
                                    :tx-data
                                    (filter (partial public? (:db-after transaction)))
                                    (map (partial datom-read-api (:db-after transaction)))
                                    seq)]
        (sente/notify-transaction (merge {:tx-data public-datoms}
                                         annotations))))))
