Optional delete message confirmation

This commit is contained in:
phiharri
2023-07-06 01:43:57 +01:00
parent aed6e3413a
commit 1d640a2cbf
3 changed files with 15 additions and 4 deletions

View File

@@ -7672,9 +7672,11 @@ $(document).ready(function () {
$(document).on("click", ".mes_edit_delete", async function () {
const confirmation = await callPopup("Are you sure you want to delete this message?", 'confirm');
if (!confirmation) {
return;
if (power_user.confirm_message_delete) {
const confirmation = await callPopup("Are you sure you want to delete this message?", 'confirm');
if (!confirmation) {
return;
}
}
const mes = $(this).closest(".mes");