From: Art Cancro Date: Mon, 13 Mar 2023 17:20:17 +0000 (-0400) Subject: When a message is deleted in a mailbox room, move it to Trash instead of deleting X-Git-Tag: v976~75 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=744509a506359dabf59c8551a95ca43b7e629abc;p=citadel.git When a message is deleted in a mailbox room, move it to Trash instead of deleting --- 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);