[backend/federation] Fix acceptance of poll vote activities without publishedAt
This commit is contained in:
parent
2108f91bcf
commit
1fae913a32
1 changed files with 3 additions and 2 deletions
|
@ -678,8 +678,6 @@ public class NoteService(
|
|||
throw GracefulException.UnprocessableEntity("Note.Id schema is invalid");
|
||||
if (note.Url?.Link != null && !note.Url.Link.StartsWith("https://"))
|
||||
throw GracefulException.UnprocessableEntity("Note.Url schema is invalid");
|
||||
if (note.PublishedAt is null or { Year: < 2007 } || note.PublishedAt > DateTime.Now + TimeSpan.FromDays(3))
|
||||
throw GracefulException.UnprocessableEntity("Note.PublishedAt is nonsensical");
|
||||
if (actor.IsSuspended)
|
||||
throw GracefulException.Forbidden("User is suspended");
|
||||
if (await fedCtrlSvc.ShouldBlockAsync(note.Id, actor.Host))
|
||||
|
@ -720,6 +718,9 @@ public class NoteService(
|
|||
|
||||
return null;
|
||||
}
|
||||
|
||||
if (note.PublishedAt is null or { Year: < 2007 } || note.PublishedAt > DateTime.Now + TimeSpan.FromDays(3))
|
||||
throw GracefulException.UnprocessableEntity("Note.PublishedAt is nonsensical");
|
||||
|
||||
if (replyUri != null)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue