mirror of
https://iceshrimp.dev/iceshrimp/iceshrimp
synced 2024-12-19 00:58:10 +09:00
[backend] Update user profile mentions on createPerson and updatePerson
This commit is contained in:
parent
82e0ef7414
commit
75c9873796
@ -386,6 +386,9 @@ export async function createPerson(
|
|||||||
// Hashtag update
|
// Hashtag update
|
||||||
updateUsertags(user!, tags);
|
updateUsertags(user!, tags);
|
||||||
|
|
||||||
|
// Mentions update
|
||||||
|
await UserProfiles.updateMentions(user!.id);
|
||||||
|
|
||||||
//#region Fetch avatar and header image
|
//#region Fetch avatar and header image
|
||||||
const [avatar, banner] = await Promise.all(
|
const [avatar, banner] = await Promise.all(
|
||||||
[person.icon, person.image].map((img) =>
|
[person.icon, person.image].map((img) =>
|
||||||
@ -603,6 +606,9 @@ export async function updatePerson(
|
|||||||
// Hashtag Update
|
// Hashtag Update
|
||||||
updateUsertags(user, tags);
|
updateUsertags(user, tags);
|
||||||
|
|
||||||
|
// Mentions update
|
||||||
|
await UserProfiles.updateMentions(user!.id);
|
||||||
|
|
||||||
// If the user in question is a follower, followers will also be updated.
|
// If the user in question is a follower, followers will also be updated.
|
||||||
await Followings.update(
|
await Followings.update(
|
||||||
{
|
{
|
||||||
|
@ -102,7 +102,7 @@ export async function resolveUser(
|
|||||||
return await createPerson(fingerRes.self.href, undefined, subjectHost);
|
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 (
|
if (
|
||||||
refresh && (
|
refresh && (
|
||||||
user.lastFetchedAt == null ||
|
user.lastFetchedAt == null ||
|
||||||
|
Loading…
Reference in New Issue
Block a user