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. All rights reserved.
Redistribution and use in source and binary forms, with or without 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 ## License
Released under the [BSD 2-clause](https://opensource.org/licenses/BSD-2-Clause) 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. All rights reserved.
Redistribution and use in source and binary forms, with or without 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 ActivityPubObject = require('./object');
const { ActivityStreamMediaType, Collections } = require('./const'); const { ActivityStreamMediaType, Collections } = require('./const');
const Config = require('../config').get; const Config = require('../config').get;
const { stripMciColorCodes } = require('../color_codes');
const { stripAnsiControlCodes } = require('../string_util');
// deps // deps
const _ = require('lodash'); 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 = { const obj = {
id: userActorId, id: userActorId,
type: 'Person', type: 'Person',
@ -121,7 +128,7 @@ module.exports = class Actor extends ActivityPubObject {
outbox: Endpoints.outbox(user), outbox: Endpoints.outbox(user),
followers: Endpoints.followers(user), followers: Endpoints.followers(user),
following: Endpoints.following(user), following: Endpoints.following(user),
summary: user.getProperty(UserProps.AutoSignature) || '', summary,
url: Endpoints.profile(user), url: Endpoints.profile(user),
manuallyApprovesFollowers: userSettings.manuallyApprovesFollowers, manuallyApprovesFollowers: userSettings.manuallyApprovesFollowers,
discoverable: userSettings.discoverable, discoverable: userSettings.discoverable,

View File

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

View File

@ -1076,7 +1076,7 @@ class QWKPacketWriter extends EventEmitter {
} }
// First block is a space padded ID // 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( this.messagesStream.write(
id.padEnd(QWKMessageBlockSize, ' '), id.padEnd(QWKMessageBlockSize, ' '),
'ascii' '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: If everything went OK:
```text ```text
ENiGMA½ Copyright (c) 2014-2022, Bryan Ashby ENiGMA½ Copyright (c) 2014-2023, Bryan Ashby
_____________________ _____ ____________________ __________\_ / _____________________ _____ ____________________ __________\_ /
\__ ____/\_ ____ \ /____/ / _____ __ \ / ______/ // /___jp! \__ ____/\_ ____ \ /____/ / _____ __ \ / ______/ // /___jp!
// __|___// | \// |// | \// | | \// \ /___ /_____ // __|___// | \// |// | \// | | \// \ /___ /_____