- numerous bug fixes
 - wtv-news goodies, ready for local testing
   - custom patched nntp-server node module with support for POSTing
   - should be able to post locally
   - 4 groups are made by default
   - can override in user_config.json (look at the config.json changes but dont do them there)
   - can sync down from an upstream server with sync_nntp.js
   - sync does not push new posts to upstream yet
This commit is contained in:
zefie
2022-10-11 21:44:18 -04:00
parent 1165b245ce
commit b89e0e932c
181 changed files with 4333 additions and 688 deletions

View File

@@ -5,12 +5,24 @@ var errpage = null;
var messageid = request_headers.query.message_id || null;
if (!messageid) {
// get user signature
data = session_data.getSessionData("subscriber_signature");
data = session_data.getSessionData("subscriber_signature");
} else {
// get message signature
var message = session_data.mailstore.getMessageByID(messageid);
if (!message) errpage = wtvshared.doErrorPage(400, "Invalid Message ID");
data = message.signature
data = message.signature;
}
if (request_headers.query.sanitize) {
if (!data) data = '';
var message_colors = session_data.mailstore.getSignatureColors(data)
if (data.indexOf("<html>") >= 0) {
data = wtvshared.sanitizeSignature(data).replace("<html>", `<html><body bgcolor=${message_colors.bgcolor} text=${message_colors.text} link=${message_colors.link} vlink=${message_colors.vlink} vspace=0 hspace=0>`);
} else {
data = `<body bgcolor=${message_colors.bgcolor} text=${message_colors.text} link=${message_colors.link} vlink=${message_colors.vlink} vspace=0 hspace=0>\n${data}`;
}
if (request_headers.query.demotext) data += "<br>" + request_headers.query.demotext;
}
if (!errpage) {
headers = `200 OK