diff src/chat.js @ 107:ed1418c95488

delete old messages
author Franklin Schmidt <fschmidt@gmail.com>
date Wed, 03 Sep 2025 12:36:57 -0600
parents 46418395c860
children
line wrap: on
line diff
--- a/src/chat.js	Wed Sep 03 07:58:46 2025 -0600
+++ b/src/chat.js	Wed Sep 03 12:36:57 2025 -0600
@@ -117,6 +117,16 @@
 	ajax(`delete_chat.js?chat=${currentChatId}`);
 }
 
+function deleteOld() {
+	let dialog = document.querySelector('dialog[delete_old]');
+	openModal(dialog);
+}
+
+function doDeleteOld(el) {
+	closeModal(el);
+	ajax(`delete_old.js?chat=${currentChatId}`);
+}
+
 let currentPostId;
 
 function getPostId(el) {