add option to edit/delete direct mssages and dynamic expiry date for attachments via config

This commit is contained in:
2026-05-18 17:22:44 +02:00
parent 313cbeddc4
commit 0393878c9f
7 changed files with 338 additions and 6 deletions

View File

@@ -63,6 +63,11 @@ export const setPrivateMessages = (val) => private_messages = !!val;
export const getDmAttachments = () => dm_attachments;
export const setDmAttachments = (val) => dm_attachments = !!val;
export const getDmAttachmentExpiryDays = () => {
const v = parseInt(cfg.websrv.dm_attachment_expiry_days);
return (Number.isFinite(v) && v > 0) ? v : 90;
};
export const getDefaultLayout = () => default_layout;
export const setDefaultLayout = (val) => default_layout = (val === 'legacy' ? 'legacy' : 'modern');