From 10efcb4d7a71858e28e2ca7a1dc6c050b8372f97 Mon Sep 17 00:00:00 2001 From: John Downey Date: Sat, 9 Apr 2022 19:01:08 -0500 Subject: [PATCH] Use id instead of _id --- src/module/dice.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/module/dice.js b/src/module/dice.js index aa91ff3..5110645 100644 --- a/src/module/dice.js +++ b/src/module/dice.js @@ -63,7 +63,7 @@ export class AcksDice { const template = "systems/acks/templates/chat/roll-result.html"; let chatData = { - user: game.user._id, + user: game.user.id, speaker: speaker, }; @@ -92,10 +92,13 @@ export class AcksDice { rollMode = game.user.isGM ? "selfroll" : "blindroll"; } - if (["gmroll", "blindroll"].includes(rollMode)) + if (["gmroll", "blindroll"].includes(rollMode)) { chatData["whisper"] = ChatMessage.getWhisperRecipients("GM"); - if (rollMode === "selfroll") chatData["whisper"] = [game.user._id]; - if (rollMode === "blindroll") { + } + + if (rollMode === "selfroll") { + chatData["whisper"] = [game.user.id]; + } else if (rollMode === "blindroll") { chatData["blind"] = true; data.roll.blindroll = true; }