mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[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:
@@ -157,6 +157,10 @@ func (p *processor) Delete(ctx context.Context, account *gtsmodel.Account, origi
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if len(statuses) == 0 {
|
||||||
|
break // reached end
|
||||||
|
}
|
||||||
|
|
||||||
for _, status := range statuses {
|
for _, status := range statuses {
|
||||||
// Ensure account is set
|
// Ensure account is set
|
||||||
status.Account = account
|
status.Account = account
|
||||||
|
Reference in New Issue
Block a user