Resolve the UUID of the document that should handle a chat-card button or
edit-action click.
Chat-card templates name the handler document inconsistently: the standard
test/fate cards use data-doc-uuid, the combat/injury cards use
data-handler-actor-uuid (the responding actor) or data-handler-uuid,
and the opposed-test cards use data-action-handler-uuid. Rather than
rename attributes across every template (which would risk regressions and
break any in-flight chat messages), the dispatcher normalizes the reader
here.
Pure function — no DOM or Foundry globals — so it is unit-testable. The
renderChatMessageHTML hook in sohl.ts calls this with the clicked
element's dataset.
Resolve the UUID of the document that should handle a chat-card button or edit-action click.
Chat-card templates name the handler document inconsistently: the standard test/fate cards use
data-doc-uuid, the combat/injury cards usedata-handler-actor-uuid(the responding actor) ordata-handler-uuid, and the opposed-test cards usedata-action-handler-uuid. Rather than rename attributes across every template (which would risk regressions and break any in-flight chat messages), the dispatcher normalizes the reader here.Pure function — no DOM or Foundry globals — so it is unit-testable. The
renderChatMessageHTMLhook insohl.tscalls this with the clicked element'sdataset.Precedence (most specific / legacy first):
data-doc-uuid(standard-test, fate, edit-action cards)data-handler-uuid(damage, injury, attack-result cards)data-handler-actor-uuid(attack-card defender responder)data-action-handler-uuid(opposed-request / opposed-result cards)