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-10 11:48:25 -06:00
commit 5e4c94210a
6 changed files with 15 additions and 8 deletions

View File

@ -1,4 +1,4 @@
Copyright (c) 2015-2022, Bryan D. Ashby
Copyright (c) 2015-2023, Bryan D. Ashby
All rights reserved.
Redistribution and use in source and binary forms, with or without

View File

@ -92,7 +92,7 @@ ENiGMA has been tested with many terminals. However, the following are suggested
## License
Released under the [BSD 2-clause](https://opensource.org/licenses/BSD-2-Clause) license:
Copyright (c) 2015-2022, Bryan D. Ashby
Copyright (c) 2015-2023, Bryan D. Ashby
All rights reserved.
Redistribution and use in source and binary forms, with or without

View File

@ -13,6 +13,8 @@ const ActivityPubSettings = require('./settings');
const ActivityPubObject = require('./object');
const { ActivityStreamMediaType, Collections } = require('./const');
const Config = require('../config').get;
const { stripMciColorCodes } = require('../color_codes');
const { stripAnsiControlCodes } = require('../string_util');
// deps
const _ = require('lodash');
@ -107,6 +109,11 @@ module.exports = class Actor extends ActivityPubObject {
}
};
const summary = stripMciColorCodes(
stripAnsiControlCodes(user.getProperty(UserProps.AutoSignature) || ''),
{ mode: 'nonAsciiPrintable' }
);
const obj = {
id: userActorId,
type: 'Person',
@ -121,7 +128,7 @@ module.exports = class Actor extends ActivityPubObject {
outbox: Endpoints.outbox(user),
followers: Endpoints.followers(user),
following: Endpoints.following(user),
summary: user.getProperty(UserProps.AutoSignature) || '',
summary,
url: Endpoints.profile(user),
manuallyApprovesFollowers: userSettings.manuallyApprovesFollowers,
discoverable: userSettings.discoverable,

View File

@ -105,7 +105,7 @@ function ansiAttemptDetectUTF8(client, cb) {
withCursorPositionReport(
client,
pos => {
const [_, w] = pos;
const [, w] = pos;
const len = w - initialPosition[1];
if (!isNaN(len) && len >= ASCIIPortion.length + 6) {
// CP437 displays 3 chars each Unicode skull
@ -154,7 +154,7 @@ const ansiQuerySyncTermFontSupport = (client, cb) => {
withCursorPositionReport(
client,
pos => {
const [_, w] = pos;
const [, w] = pos;
if (w === 1) {
// cursor didn't move
client.log.info(`SyncTERM font support enabled on node ${client.node}`);
@ -234,7 +234,7 @@ function displayBanner(term) {
// note: intentional formatting:
term.pipeWrite(`
|06Connected to |02EN|10i|02GMA|10½ |06BBS version |12|VN
|06Copyright (c) 2014-2022 Bryan Ashby |14- |12http://l33t.codes/
|06Copyright (c) 2014-2023 Bryan Ashby |14- |12http://l33t.codes/
|06Updates & source |14- |12https://github.com/NuSkooler/enigma-bbs/
|00`);
}

View File

@ -1076,7 +1076,7 @@ class QWKPacketWriter extends EventEmitter {
}
// First block is a space padded ID
const id = `Created with ENiGMA 1/2 BBS v${enigmaVersion} Copyright (c) 2015-2022 Bryan Ashby`;
const id = `Created with ENiGMA 1/2 BBS v${enigmaVersion} Copyright (c) 2015-2023 Bryan Ashby`;
this.messagesStream.write(
id.padEnd(QWKMessageBlockSize, ' '),
'ascii'

View File

@ -13,7 +13,7 @@ _Note that if you've used the [Docker](docker.md) installation method, you've al
If everything went OK:
```text
ENiGMA½ Copyright (c) 2014-2022, Bryan Ashby
ENiGMA½ Copyright (c) 2014-2023, Bryan Ashby
_____________________ _____ ____________________ __________\_ /
\__ ____/\_ ____ \ /____/ / _____ __ \ / ______/ // /___jp!
// __|___// | \// |// | \// | | \// \ /___ /_____