Skip to content

Commit

Permalink
Merge pull request #50 from Talaren/fixOOC
Browse files Browse the repository at this point in the history
  • Loading branch information
cswendrowski authored Jul 20, 2021
2 parents 07ed700 + e32aabe commit 8d7e73d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
![](https://img.shields.io/badge/Foundry-v0.8.6-informational)
![](https://img.shields.io/badge/Foundry-v0.8.8-informational)
[![](https://img.shields.io/badge/Buy%20Me%20A%20Coffee-%243-orange)](https://www.buymeacoffee.com/T2tZvWJ)


Expand Down
6 changes: 3 additions & 3 deletions module.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"name": "tabbed-chatlog",
"title": "Tabbed Chatlog",
"description": "Splits the Chatlog into In Character (per scene), Rolls (per scene), and Out of Character (global).",
"version": "1.6.1",
"version": "1.6.3",
"minimumCoreVersion": "0.8.0",
"compatibleCoreVersion": "0.8.7",
"compatibleCoreVersion": "0.8.8",
"author": "Cody Swendrowski <[email protected]>",
"esmodules": [
"./tabbed-chatlog.js"
Expand Down Expand Up @@ -42,5 +42,5 @@
],
"url": "https://github.com/cswendrowski/FoundryVTT-tabbed-chatlog",
"manifest": "https://github.com/cswendrowski/FoundryVTT-tabbed-chatlog/releases/download/latest/module.json",
"download": "https://github.com/cswendrowski/FoundryVTT-tabbed-chatlog/releases/download/1.6.1/module.zip"
"download": "https://github.com/cswendrowski/FoundryVTT-tabbed-chatlog/releases/download/1.6.3/module.zip"
}
8 changes: 6 additions & 2 deletions tabbed-chatlog.js
Original file line number Diff line number Diff line change
Expand Up @@ -273,8 +273,12 @@ Hooks.on("preCreateChatMessage", (chatMessage, content) => {
if (game.settings.get('tabbed-chatlog', 'icChatInOoc')) {
if (currentTab == "ooc") {
if (chatMessage.data.type == CONST.CHAT_MESSAGE_TYPES.IC) {
chatMessage.data._source.type = CONST.CHAT_MESSAGE_TYPES.OOC;
chatMessage.data.type = CONST.CHAT_MESSAGE_TYPES.OOC;
content.type = CONST.CHAT_MESSAGE_TYPES.OOC
delete (content.speaker);
delete (chatMessage.data.speaker);
delete (chatMessage.data._source.speaker);
console.log(chatMessage);
}
}
Expand Down Expand Up @@ -309,7 +313,7 @@ Hooks.on("preCreateChatMessage", (chatMessage, content) => {

img = game.data.addresses.remote + "/" + img;

if (!chatMessage.whisper?.length) {
if (!chatMessage.data.whisper?.length) {
let message = chatMessage.data.content;
if (game.modules.get("polyglot")?.active) {
const LanguageProvider = polyglot.polyglot.LanguageProvider;
Expand Down Expand Up @@ -338,7 +342,7 @@ Hooks.on("preCreateChatMessage", (chatMessage, content) => {
let img = game.users.get(chatMessage.user.id).avatar;
img = game.data.addresses.remote + "/" + img;

if (!chatMessage.whisper?.length) {
if (!chatMessage.data.whisper?.length) {
let message = chatMessage.data.content;
if (game.modules.get("polyglot")?.active) {
let lang = chatMessage.data.flags.polyglot.language
Expand Down

0 comments on commit 8d7e73d

Please sign in to comment.