pwatson100 / alienrpg

Alien RPG system for Foundry VTT.
GNU General Public License v3.0
38 stars 31 forks source link

Players can delete their own chat cards #249

Closed pwatson100 closed 1 year ago

pwatson100 commented 1 year ago

Players can delete and make private their own chat cards. Should not be able to do that!!!

pwatson100 commented 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; } });`