forked from public/foundryvtt-reve-de-dragon
Fix: Message uniquement MJ
L'utilisation de firstConnectedGM renvoie le GM, pas true si un GM est connecté.
This commit is contained in:
@ -49,7 +49,7 @@ export class ChatUtility {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static onRemoveMessages(socketData) {
|
||||
if (Misc.isUniqueConnectedGM()) {
|
||||
if (Misc.isFirstConnectedGM()) {
|
||||
if (socketData.part) {
|
||||
const toDelete = game.messages.filter(it => it.content.includes(socketData.part));
|
||||
toDelete.forEach(it => it.delete());
|
||||
@ -63,7 +63,7 @@ export class ChatUtility {
|
||||
/* -------------------------------------------- */
|
||||
|
||||
static removeMessages(socketData) {
|
||||
if (Misc.isUniqueConnectedGM()) {
|
||||
if (Misc.isFirstConnectedGM()) {
|
||||
ChatUtility.onRemoveMessages(socketData);
|
||||
}
|
||||
else {
|
||||
@ -161,7 +161,7 @@ export class ChatUtility {
|
||||
/* -------------------------------------------- */
|
||||
static handleGMChatMessage(socketData) {
|
||||
console.log("blindMessageToGM", socketData);
|
||||
if (Misc.firstConnectedGM()) {
|
||||
if (Misc.isFirstConnectedGM()) {
|
||||
ChatMessage.create({
|
||||
user: game.user.id,
|
||||
whisper: ChatUtility.getGMs(),
|
||||
|
Reference in New Issue
Block a user