Fix dumb bugs

This commit is contained in:
Bryan Ashby 2023-02-08 20:10:50 -07:00
parent 9b08cf827b
commit fb039c1abc
No known key found for this signature in database
GPG Key ID: C2C1B501E4EFD994
1 changed files with 7 additions and 5 deletions

View File

@ -77,7 +77,7 @@ exports.getModule = class ActivityPubScannerTosser extends MessageScanTossModule
) )
); );
} }
return callback(null, noteInfo, [noteInfo.remoteActor.id]); return callback(null, noteInfo, [noteInfo.remoteActor.inbox]);
} }
// public: we need to build a list of sharedInbox's // public: we need to build a list of sharedInbox's
@ -103,7 +103,7 @@ exports.getModule = class ActivityPubScannerTosser extends MessageScanTossModule
// cc: [sharedInboxEndpoints] // cc: [sharedInboxEndpoints]
// //
if (message.isPrivate()) { if (message.isPrivate()) {
note.to = deliveryEndpoints.sharedInboxes[0]; note.to = deliveryEndpoints;
} else { } else {
if (deliveryEndpoints.additionalTo) { if (deliveryEndpoints.additionalTo) {
note.to = [ note.to = [
@ -131,7 +131,9 @@ exports.getModule = class ActivityPubScannerTosser extends MessageScanTossModule
context context
); );
let allEndpoints = deliveryEndpoints.sharedInboxes; let allEndpoints = Array.isArray(deliveryEndpoints)
? deliveryEndpoints
: deliveryEndpoints.sharedInboxes;
if (deliveryEndpoints.additionalTo) { if (deliveryEndpoints.additionalTo) {
allEndpoints.push(deliveryEndpoints.additionalTo); allEndpoints.push(deliveryEndpoints.additionalTo);
} }
@ -247,8 +249,8 @@ exports.getModule = class ActivityPubScannerTosser extends MessageScanTossModule
} }
} else { } else {
this.log.info( this.log.info(
{ id: activity.id }, { activityId: activity.id, noteId: activity.object.id },
'Note Activity exported (published) successfully' 'Note Activity published successfully'
); );
} }
} }