Fix local-to-local user in public area

This commit is contained in:
Bryan Ashby 2023-02-09 20:36:11 -07:00
parent c0914af002
commit 1fcadef8d0
No known key found for this signature in database
GPG Key ID: C2C1B501E4EFD994
2 changed files with 2 additions and 8 deletions

View File

@ -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(

View File

@ -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*