[backend/federation] Don't fetch inboxUser from database if inboxUserId is null
This commit is contained in:
parent
e65c678a35
commit
0e6edb9046
1 changed files with 4 additions and 1 deletions
|
@ -57,7 +57,10 @@ public class ActivityHandlerService(
|
|||
throw new Exception("resolvedActor.Host and resolvedActor.Uri must not be null at this stage");
|
||||
|
||||
UpdateInstanceMetadataInBackground(resolvedActor.Host, new Uri(resolvedActor.Uri).Host);
|
||||
var inboxUser = await db.Users.IncludeCommonProperties().FirstOrDefaultAsync(p => p.Id == inboxUserId);
|
||||
|
||||
var inboxUser = inboxUserId != null
|
||||
? await db.Users.IncludeCommonProperties().FirstOrDefaultAsync(p => p.Id == inboxUserId)
|
||||
: null;
|
||||
|
||||
var task = activity switch
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue