Skip to content

Commit f449f63

Browse files
authored
Merge pull request #164 from elizeuangelo/master
Adds the Speaker's Scene to the Chat Message
2 parents f138db9 + 8689dc2 commit f449f63

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/module.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,12 +137,12 @@ Hooks.on("deleteCombat", function () {
137137
* Pre-process chat message to set 'speaking as' to correspond
138138
* to our 'speaking as'
139139
*/
140-
Hooks.on("preCreateChatMessage", function (chatMessage) {
140+
Hooks.on("preCreateChatMessage", function (chatMessage, data) {
141141
let chatData = {
142142
speaker: {
143143
//actor: null,
144144
//The above line is causing issues with chat buttons in v11 in certain systems. Will revert if it causes unforseen issues in other systems.
145-
scene: null,
145+
scene: data.speaker?.scene,
146146
flags: {},
147147
},
148148
};

0 commit comments

Comments
 (0)