Skip to content

Commit

Permalink
fix(backend): Create a new resolver in parseAudience if resolver is none
Browse files Browse the repository at this point in the history
  • Loading branch information
atsu1125 committed Jan 31, 2025
1 parent 1a7a850 commit ee58a28
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/remote/activitypub/audience.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ export async function parseAudience(actor: IRemoteUser, to?: ApObject, cc?: ApOb

const others = unique(concat([toGroups.other, ccGroups.other]));

if (resolver == null) resolver = new Resolver();

const limit = promiseLimit<User | null>(2);
const mentionedUsers = (await Promise.all(
others.map(id => limit(() => resolvePerson(id, resolver).catch(() => null)))
Expand Down

0 comments on commit ee58a28

Please sign in to comment.