fix: reaction schema results in invalid nodes

This commit is contained in:
Gabriel Horner
2026-02-11 15:07:00 -05:00
parent adff65c6bc
commit 0d1b997fa9
2 changed files with 4 additions and 2 deletions

View File

@@ -437,9 +437,10 @@
"A reaction entity referencing a target node"
(vec
[:map {:error/path ["reaction-entity"]}
[:block/uuid :uuid]
[:logseq.property.reaction/emoji-id :string]
[:logseq.property.reaction/target :int]
[:logseq.property/created-by-ref {:optional true} :int]
[:block/properties {:optional true} block-properties]
[:block/created-at :int]
[:block/tx-id {:optional true} :int]]))

View File

@@ -13,7 +13,8 @@
:blocks [{:block/title "Block"}]}]})
block (db-test/find-block-by-content @conn "Block")
now (common-util/time-ms)
reaction {:block/created-at now
reaction {:block/uuid (random-uuid)
:block/created-at now
:logseq.property.reaction/emoji-id "+1"
:logseq.property.reaction/target (:db/id block)}]
(d/transact! conn [reaction])