[backend/federation] Reject activities by suspended users
This commit is contained in:
parent
a61ca299b6
commit
2181d01e54
1 changed files with 3 additions and 0 deletions
|
@ -58,6 +58,9 @@ public class ActivityHandlerService(
|
||||||
|
|
||||||
UpdateInstanceMetadataInBackground(resolvedActor.Host, new Uri(resolvedActor.Uri).Host);
|
UpdateInstanceMetadataInBackground(resolvedActor.Host, new Uri(resolvedActor.Uri).Host);
|
||||||
|
|
||||||
|
if (resolvedActor.IsSuspended && activity is not ASDelete)
|
||||||
|
throw GracefulException.UnprocessableEntity("Actor is suspended");
|
||||||
|
|
||||||
var inboxUser = inboxUserId != null
|
var inboxUser = inboxUserId != null
|
||||||
? await db.Users.IncludeCommonProperties().FirstOrDefaultAsync(p => p.Id == inboxUserId)
|
? await db.Users.IncludeCommonProperties().FirstOrDefaultAsync(p => p.Id == inboxUserId)
|
||||||
: null;
|
: null;
|
||||||
|
|
Loading…
Add table
Reference in a new issue