Merge branch '459-activitypub-integration' of ssh://numinibsd/git/base/enigma-bbs into 459-activitypub-integration

This commit is contained in:
Bryan Ashby 2023-04-26 21:40:51 -06:00
commit 4501140a15
4 changed files with 7 additions and 4 deletions

View File

@ -1622,6 +1622,9 @@ function FTNMessageScanTossModule() {
const addrString = new Address( const addrString = new Address(
packetHeader.destAddress packetHeader.destAddress
).toString(); ).toString();
importStats.otherFail += 1;
return next( return next(
new Error( new Error(
`No local configuration for packet addressed to ${addrString}` `No local configuration for packet addressed to ${addrString}`

View File

@ -273,7 +273,7 @@ exports.getModule = class WebServerModule extends ServerModule {
ok(resp, body = '', headers = { 'Content-Type': 'text/html' }) { ok(resp, body = '', headers = { 'Content-Type': 'text/html' }) {
if (body && !headers['Content-Length']) { if (body && !headers['Content-Length']) {
headers['Content-Length'] = Buffer(body).length; headers['Content-Length'] = Buffer.from(body).length;
} }
resp.writeHead(200, 'OK', body ? headers : null); resp.writeHead(200, 'OK', body ? headers : null);
return resp.end(body); return resp.end(body);

View File

@ -52,7 +52,7 @@ exports.getModule = class NodeInfo2WebHandler extends WebHandlerModule {
const body = JSON.stringify(nodeInfo); const body = JSON.stringify(nodeInfo);
const headers = { const headers = {
'Content-Type': 'application/json', 'Content-Type': 'application/json',
'Content-Length': Buffer(body).length, 'Content-Length': Buffer.from(body).length,
}; };
resp.writeHead(200, headers); resp.writeHead(200, headers);

View File

@ -117,7 +117,7 @@ exports.getModule = class WebFingerWebHandler extends WebHandlerModule {
const headers = { const headers = {
'Content-Type': contentType, 'Content-Type': contentType,
'Content-Length': Buffer(body).length, 'Content-Length': Buffer.from(body).length,
}; };
resp.writeHead(200, headers); resp.writeHead(200, headers);
@ -168,7 +168,7 @@ exports.getModule = class WebFingerWebHandler extends WebHandlerModule {
const headers = { const headers = {
'Content-Type': 'application/jrd+json', 'Content-Type': 'application/jrd+json',
'Content-Length': Buffer(body).length, 'Content-Length': Buffer.from(body).length,
}; };
resp.writeHead(200, headers); resp.writeHead(200, headers);