From 5edcea3ab54960581fd984566796a6bfd3ffe7d1 Mon Sep 17 00:00:00 2001 From: Laura Hausmann Date: Mon, 26 Feb 2024 20:20:00 +0100 Subject: [PATCH] [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 --- Iceshrimp.Backend/Core/Services/UserService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Iceshrimp.Backend/Core/Services/UserService.cs b/Iceshrimp.Backend/Core/Services/UserService.cs index 70f417e7..666571a0 100644 --- a/Iceshrimp.Backend/Core/Services/UserService.cs +++ b/Iceshrimp.Backend/Core/Services/UserService.cs @@ -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,