mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-27 09:06:15 +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
|
actors = actors.filter(Boolean); // remove unresolvable actors
|
||||||
|
|
||||||
// Build userData object for storage
|
// 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 now = Date.now();
|
||||||
|
|
||||||
const bulkSet = profiles.reduce((memo, profile) => {
|
const bulkSet = profiles.reduce((memo, profile) => {
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ const sanitizeConfig = {
|
|||||||
|
|
||||||
Mocks.profile = async (actors) => {
|
Mocks.profile = async (actors) => {
|
||||||
// Should only ever be called by activitypub.actors.assert
|
// 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) {
|
if (!actor) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -78,7 +78,7 @@ Mocks.profile = async (actors) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return payload;
|
return payload;
|
||||||
})));
|
}));
|
||||||
|
|
||||||
return profiles;
|
return profiles;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user