Fix local-to-local user in public area
This commit is contained in:
parent
c0914af002
commit
1fcadef8d0
|
@ -69,12 +69,6 @@ module.exports = class Note extends ActivityPubObject {
|
||||||
return cb(Errors.UnexpectedState('Invalid user ID for local user!'));
|
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();
|
const remoteActorAccount = message.getRemoteToUser();
|
||||||
if (!remoteActorAccount && message.isPrivate()) {
|
if (!remoteActorAccount && message.isPrivate()) {
|
||||||
return cb(
|
return cb(
|
||||||
|
|
|
@ -63,7 +63,6 @@ exports.getModule = class ActivityPubScannerTosser extends MessageScanTossModule
|
||||||
async.waterfall(
|
async.waterfall(
|
||||||
[
|
[
|
||||||
callback => {
|
callback => {
|
||||||
// Private or addressed to a single AP Actor:
|
|
||||||
Note.fromLocalMessage(message, this._webServer(), (err, noteInfo) => {
|
Note.fromLocalMessage(message, this._webServer(), (err, noteInfo) => {
|
||||||
return callback(err, noteInfo);
|
return callback(err, noteInfo);
|
||||||
});
|
});
|
||||||
|
@ -95,7 +94,8 @@ exports.getModule = class ActivityPubScannerTosser extends MessageScanTossModule
|
||||||
//
|
//
|
||||||
// Update the Note's addressing:
|
// Update the Note's addressing:
|
||||||
// - Private:
|
// - Private:
|
||||||
// to: sharedInboxEndpoints[0]
|
// to: Directly to addressed-to Actor inbox
|
||||||
|
//
|
||||||
// - Public:
|
// - Public:
|
||||||
// to: https://www.w3.org/ns/activitystreams#Public
|
// to: https://www.w3.org/ns/activitystreams#Public
|
||||||
// ... and the message.getRemoteToUser() value *if*
|
// ... and the message.getRemoteToUser() value *if*
|
||||||
|
|
Loading…
Reference in New Issue