comparison 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
comparison
equal deleted inserted replaced
106:15cf43dd144c 107:ed1418c95488
115 function doDeleteChat(el) { 115 function doDeleteChat(el) {
116 closeModal(el); 116 closeModal(el);
117 ajax(`delete_chat.js?chat=${currentChatId}`); 117 ajax(`delete_chat.js?chat=${currentChatId}`);
118 } 118 }
119 119
120 function deleteOld() {
121 let dialog = document.querySelector('dialog[delete_old]');
122 openModal(dialog);
123 }
124
125 function doDeleteOld(el) {
126 closeModal(el);
127 ajax(`delete_old.js?chat=${currentChatId}`);
128 }
129
120 let currentPostId; 130 let currentPostId;
121 131
122 function getPostId(el) { 132 function getPostId(el) {
123 while(true) { 133 while(true) {
124 let postId = el.getAttribute('post'); 134 let postId = el.getAttribute('post');