[bugfix] fix panic during status delete loop by breaking out early on len(statuses) == 0 (#1317)

Signed-off-by: kim <grufwub@gmail.com>

Signed-off-by: kim <grufwub@gmail.com>
This commit is contained in:
kim 2023-01-08 10:33:03 +00:00 committed by GitHub
parent 67919204af
commit 2bf9bfa24f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -157,6 +157,10 @@ func (p *processor) Delete(ctx context.Context, account *gtsmodel.Account, origi
break
}
if len(statuses) == 0 {
break // reached end
}
for _, status := range statuses {
// Ensure account is set
status.Account = account