improved code comment re: requesting account delete checks

This commit is contained in:
kim 2024-04-26 12:36:08 +01:00
parent 101e6bd192
commit 1733a0d422

View file

@ -102,7 +102,10 @@ func (f *federatingDB) deleteAccount(
} }
if account != nil { if account != nil {
// Ensure requesting account is
// only trying to delete itself.
if account.ID != requesting.ID { if account.ID != requesting.ID {
// TODO: handled forwarded deletes, // TODO: handled forwarded deletes,
// for now we silently drop this. // for now we silently drop this.
return true, nil return true, nil
@ -138,7 +141,10 @@ func (f *federatingDB) deleteStatus(
} }
if status != nil { if status != nil {
// Ensure requesting account is only
// trying to delete its own statuses.
if status.AccountID != requesting.ID { if status.AccountID != requesting.ID {
// TODO: handled forwarded deletes, // TODO: handled forwarded deletes,
// for now we silently drop this. // for now we silently drop this.
return true, nil return true, nil