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-21 12:00:11 -06:00
commit fa95616933
1 changed files with 2 additions and 2 deletions

View File

@ -405,7 +405,7 @@ module.exports = class Note extends ActivityPubObject {
// or 32 characters in length, whichever comes first
// - If not end of string, we'll sub in '...'
//
let subject = message.message.replace(`@${message.toUserName} `, '').trim();
let subject = message.message.replace(/^@[^ ]+ /, '').trim();
const m = /^(.+)\r?\n/.exec(subject);
if (m && m[1]) {
subject = m[1];
@ -423,7 +423,7 @@ module.exports = class Note extends ActivityPubObject {
return;
}
const m = /^@([^ ]+) ./.exec(message.message);
const m = /^(@[^ ]+) ./.exec(message.message);
if (m && m[1]) {
message.toUserName = m[1];
}