canDeleteSwipe = power_user.confirm_message_delete Fixes #4799

d04aaec7cf5be3ff8c4af62e760bd22580c0d82b

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +1 -1Showing whitespace changes
public/script.js+1 -1
@@ -11158,7 +11158,7 @@ jQuery(async function () {
1115811158 const message = chat[this_edit_mes_id];
1115911159 const selectedSwipe = message['swipe_id'] ?? undefined;
1116011160 const swipesArray = Array.isArray(message['swipes']) ? message['swipes'] : [];
1116111161 const canDeleteSwipe = power_user.confirm_message_delete && !fromSlashCommand && !message.is_user && swipesArray.length > 1 && this_edit_mes_id === chat.length - 1 && selectedSwipe !== undefined;
1116211162 await deleteMessage(Number(this_edit_mes_id), canDeleteSwipe ? selectedSwipe : undefined, power_user.confirm_message_delete && fromSlashCommand !== true);
1116311163 });
1116411164