mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-13 07:40:59 +00:00
fix(wanderer): say so when wanderer names no author for the token's account
A token whose account has no local ActivityPub author was reported as invalid_response, which the settings show as 'The answer did not come from wanderer', although wanderer had answered fine. It now has its own code, no_author, with a message in every language that says what is missing.
This commit is contained in:
@@ -259,7 +259,13 @@ export class WandererClient {
|
||||
const actors = (user.expand?.activitypub_actors_via_user ?? [])
|
||||
.filter((actor) => actor.is_local !== false && isTrailId(actor.id))
|
||||
.map((actor) => actor.id);
|
||||
if (actors.length === 0) throw new WandererError('invalid_response', 'wanderer named no author for the token');
|
||||
if (actors.length === 0) {
|
||||
throw new WandererError(
|
||||
'no_author',
|
||||
'wanderer named no author for the token',
|
||||
'no local actor in activitypub_actors_via_user',
|
||||
);
|
||||
}
|
||||
return actors;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user