merge: Fix link verification for actors without a url field *FOR STABLE* (!1193)

View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/1193

Approved-by: Hazelnoot <acomputerdog@gmail.com>
This commit is contained in:
Hazelnoot 2025-07-27 18:01:58 +00:00
commit 823fdf2745
3 changed files with 12 additions and 6 deletions

View file

@ -603,11 +603,15 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
this.globalEventService.publishInternalEvent('localUserUpdated', { id: user.id });
}
const verified_links = await verifyFieldLinks(newFields, `${this.config.url}/@${user.username}`, this.httpRequestService);
const profileUrls = [
this.userEntityService.genLocalUserUri(user.id),
`${this.config.url}/@${user.username}`,
];
const verifiedLinks = await verifyFieldLinks(newFields, profileUrls, this.httpRequestService);
await this.userProfilesRepository.update(user.id, {
...profileUpdates,
verifiedLinks: verified_links,
verifiedLinks,
});
const iObj = await this.userEntityService.pack(user.id, user, {