Update packages/backend/src/server/api/endpoints/i/update.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
parent
2a112ffe5b
commit
1496f4164a
|
|
@ -577,7 +577,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
const linkEls = Array.from(doc.getElementsByTagName('link'));
|
const linkEls = Array.from(doc.getElementsByTagName('link'));
|
||||||
|
|
||||||
const includesMyLink = aEls.some(a => a.attributes.href === myLink);
|
const includesMyLink = aEls.some(a => a.attributes.href === myLink);
|
||||||
const includesRelMeLinks = [...aEls, ...linkEls].some(link => link.attributes.rel === 'me' && link.attributes.href === myLink);
|
const includesRelMeLinks = [...aEls, ...linkEls].some(link => link.attributes.rel?.split(/\s+/).includes('me') && link.attributes.href === myLink);
|
||||||
|
|
||||||
if (includesMyLink || includesRelMeLinks) {
|
if (includesMyLink || includesRelMeLinks) {
|
||||||
await this.userProfilesRepository.createQueryBuilder('profile').update()
|
await this.userProfilesRepository.createQueryBuilder('profile').update()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue