Closed pwatson100 closed 1 year ago
Currently there is no way to stop a player from deleting their own chat messages.
The context menu is baked into the ChatLog class so I would need to rewrite that to remove the option.
But I can intercept the predelete to stop the deletion:
// prevent players from deleting messages with rolls
Hooks.on('preDeleteChatMessage', (message) => {
if (!game.user.isGM && message.rolls?.length) {
ui.notifications.warn("No deleting messages");
return false;
}
});`
Players can delete and make private their own chat cards. Should not be able to do that!!!