From 744509a506359dabf59c8551a95ca43b7e629abc Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Mon, 13 Mar 2023 13:20:17 -0400 Subject: [PATCH] When a message is deleted in a mailbox room, move it to Trash instead of deleting --- webcit-ng/static/js/view_mail.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/webcit-ng/static/js/view_mail.js b/webcit-ng/static/js/view_mail.js index 3cfdb8ca3..0cbd52705 100644 --- a/webcit-ng/static/js/view_mail.js +++ b/webcit-ng/static/js/view_mail.js @@ -20,7 +20,10 @@ mail_delete_func = async(table, row) => { let m = parseInt(row["id"].substring(12)); // derive msgnum from row id response = await fetch( "/ctdl/r/" + escapeHTMLURI(current_room) + "/" + m, - { method: "DELETE" } + { + method: "MOVE", + headers: { "Destination" : "/ctdl/r/_TRASH_" } + }, ); if (response.ok) { // If the server accepted the delete, blank out the message div. table.deleteRow(row.rowIndex); -- 2.39.2