[backend/federation] Only set LastFetchedAt in CreateUserAsync if we're not on a background thread

This makes sure that the next call to GetUpdatedUser resolves mentions for this user
This commit is contained in:
Laura Hausmann 2024-02-26 20:20:00 +01:00
parent b8d92b56bb
commit 5edcea3ab5
No known key found for this signature in database
GPG key ID: D044E84C5BE01605

View file

@ -136,7 +136,7 @@ public class UserService(
{
Id = IdHelpers.GenerateSlowflakeId(),
CreatedAt = DateTime.UtcNow,
LastFetchedAt = DateTime.UtcNow,
LastFetchedAt = followupTaskSvc.IsBackgroundWorker ? null : DateTime.UtcNow,
DisplayName = actor.DisplayName,
IsLocked = actor.IsLocked ?? false,
IsBot = actor.IsBot,