mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 08:36:12 +01:00
fix: another crash
This commit is contained in:
@@ -122,7 +122,7 @@ Actors.assert = async (ids, options = {}) => {
|
||||
actors = actors.filter(Boolean); // remove unresolvable actors
|
||||
|
||||
// Build userData object for storage
|
||||
const profiles = await activitypub.mocks.profile(actors);
|
||||
const profiles = (await activitypub.mocks.profile(actors)).filter(Boolean);
|
||||
const now = Date.now();
|
||||
|
||||
const bulkSet = profiles.reduce((memo, profile) => {
|
||||
|
||||
@@ -29,7 +29,7 @@ const sanitizeConfig = {
|
||||
|
||||
Mocks.profile = async (actors) => {
|
||||
// Should only ever be called by activitypub.actors.assert
|
||||
const profiles = (await Promise.all(actors.map(async (actor) => {
|
||||
const profiles = await Promise.all(actors.map(async (actor) => {
|
||||
if (!actor) {
|
||||
return null;
|
||||
}
|
||||
@@ -78,7 +78,7 @@ Mocks.profile = async (actors) => {
|
||||
};
|
||||
|
||||
return payload;
|
||||
})));
|
||||
}));
|
||||
|
||||
return profiles;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user