fix: move group-by out and limit notify blocks' length

This commit is contained in:
Tienson Qin
2023-01-05 18:17:18 +08:00
parent 9820db95e2
commit 4b6004f9d5
2 changed files with 8 additions and 6 deletions

View File

@@ -490,11 +490,10 @@
(defn hook-plugin-block-changes
[{:keys [blocks tx-data tx-meta]}]
(doseq [b blocks
:let [tx-data' (group-by first tx-data)
type (str "block:" (:block/uuid b))]]
(hook-plugin-db type {:block b :tx-data (get tx-data' (:db/id b)) :tx-meta tx-meta})))
(let [tx-data' (group-by first tx-data)]
(doseq [b blocks]
(let [type (str "block:" (:block/uuid b))]
(hook-plugin-db type {:block b :tx-data (get tx-data' (:db/id b)) :tx-meta tx-meta})))))
(defn hook-plugin-block-slot
[block payload]