[backend] Create a new resolver in parseAudience if none is passed to the function
This commit addresses disclosed primitive 23
This commit is contained in:
parent
dc3c2d1ad4
commit
ca331d2406
1 changed files with 2 additions and 1 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
import type { ApObject } from "./type.js";
|
import type { ApObject } from "./type.js";
|
||||||
import { getApIds } from "./type.js";
|
import { getApIds } from "./type.js";
|
||||||
import type Resolver from "./resolver.js";
|
import Resolver from "./resolver.js";
|
||||||
import { resolvePerson } from "./models/person.js";
|
import { resolvePerson } from "./models/person.js";
|
||||||
import { unique, concat } from "@/prelude/array.js";
|
import { unique, concat } from "@/prelude/array.js";
|
||||||
import promiseLimit from "promise-limit";
|
import promiseLimit from "promise-limit";
|
||||||
|
|
@ -31,6 +31,7 @@ export async function parseAudience(
|
||||||
|
|
||||||
const others = unique(concat([toGroups.other, ccGroups.other]));
|
const others = unique(concat([toGroups.other, ccGroups.other]));
|
||||||
|
|
||||||
|
resolver ??= new Resolver();
|
||||||
const limit = promiseLimit<CacheableUser | null>(2);
|
const limit = promiseLimit<CacheableUser | null>(2);
|
||||||
const mentionedUsers = (
|
const mentionedUsers = (
|
||||||
await Promise.all(
|
await Promise.all(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue