cache when computing note count etc.
This commit is contained in:
parent
5408929c2a
commit
d55f8742b8
1 changed files with 7 additions and 0 deletions
|
@ -182,6 +182,13 @@ export default define(meta, paramDef, async (ps, me) => {
|
|||
|
||||
result.followingCount = result.localFollowingCount + result.remoteFollowingCount;
|
||||
result.followersCount = result.localFollowersCount + result.remoteFollowersCount;
|
||||
|
||||
// store the updated counts in the user table to potentially fix the cache
|
||||
Users.update(user.id, {
|
||||
followersCount: result.followersCount,
|
||||
followingCount: result.followingCount,
|
||||
notesCount: result.notesCount,
|
||||
});
|
||||
}
|
||||
|
||||
return result;
|
||||
|
|
Loading…
Reference in a new issue