From 1fcadef8d0e54ed594c24e904af8dd614eefe86e Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Thu, 9 Feb 2023 20:36:11 -0700 Subject: [PATCH] Fix local-to-local user in public area --- core/activitypub/note.js | 6 ------ core/scanner_tossers/activitypub.js | 4 ++-- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/core/activitypub/note.js b/core/activitypub/note.js index 9b4e5715..1d80ed79 100644 --- a/core/activitypub/note.js +++ b/core/activitypub/note.js @@ -69,12 +69,6 @@ module.exports = class Note extends ActivityPubObject { return cb(Errors.UnexpectedState('Invalid user ID for local user!')); } - if (Message.AddressFlavor.ActivityPub !== message.getAddressFlavor()) { - return cb( - Errors.Invalid('Cannot build note for non-ActivityPub addressed message') - ); - } - const remoteActorAccount = message.getRemoteToUser(); if (!remoteActorAccount && message.isPrivate()) { return cb( diff --git a/core/scanner_tossers/activitypub.js b/core/scanner_tossers/activitypub.js index 22d32d58..35e23ed4 100644 --- a/core/scanner_tossers/activitypub.js +++ b/core/scanner_tossers/activitypub.js @@ -63,7 +63,6 @@ exports.getModule = class ActivityPubScannerTosser extends MessageScanTossModule async.waterfall( [ callback => { - // Private or addressed to a single AP Actor: Note.fromLocalMessage(message, this._webServer(), (err, noteInfo) => { return callback(err, noteInfo); }); @@ -95,7 +94,8 @@ exports.getModule = class ActivityPubScannerTosser extends MessageScanTossModule // // Update the Note's addressing: // - Private: - // to: sharedInboxEndpoints[0] + // to: Directly to addressed-to Actor inbox + // // - Public: // to: https://www.w3.org/ns/activitystreams#Public // ... and the message.getRemoteToUser() value *if*