[backend] Update user profile mentions on createPerson and updatePerson

This commit is contained in:
Laura Hausmann 2023-10-15 22:26:51 +02:00
parent 82e0ef7414
commit 75c9873796
No known key found for this signature in database
GPG key ID: D044E84C5BE01605
2 changed files with 7 additions and 1 deletions

View file

@ -386,6 +386,9 @@ export async function createPerson(
// Hashtag update
updateUsertags(user!, tags);
// Mentions update
await UserProfiles.updateMentions(user!.id);
//#region Fetch avatar and header image
const [avatar, banner] = await Promise.all(
[person.icon, person.image].map((img) =>
@ -603,6 +606,9 @@ export async function updatePerson(
// Hashtag Update
updateUsertags(user, tags);
// Mentions update
await UserProfiles.updateMentions(user!.id);
// If the user in question is a follower, followers will also be updated.
await Followings.update(
{

View file

@ -102,7 +102,7 @@ export async function resolveUser(
return await createPerson(fingerRes.self.href, undefined, subjectHost);
}
// If user information is out of date, return it by starting over from WebFilger
// If user information is out of date, return it by starting over from WebFinger
if (
refresh && (
user.lastFetchedAt == null ||