mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-02 13:02:26 -06:00
[bugfix] more robust list timeline invalidation (#1995)
This commit is contained in:
parent
346ecabd07
commit
f4319740ab
15 changed files with 254 additions and 226 deletions
|
|
@ -27,7 +27,8 @@ import (
|
|||
|
||||
// Delete deletes one list for the given account.
|
||||
func (p *Processor) Delete(ctx context.Context, account *gtsmodel.Account, id string) gtserror.WithCode {
|
||||
list, errWithCode := p.getList(
|
||||
// Ensure list exists + is owned by requesting account.
|
||||
_, errWithCode := p.getList(
|
||||
// Use barebones ctx; no embedded
|
||||
// structs necessary for this call.
|
||||
gtscontext.SetBarebones(ctx),
|
||||
|
|
@ -38,7 +39,7 @@ func (p *Processor) Delete(ctx context.Context, account *gtsmodel.Account, id st
|
|||
return errWithCode
|
||||
}
|
||||
|
||||
if err := p.state.DB.DeleteListByID(ctx, list.ID); err != nil {
|
||||
if err := p.state.DB.DeleteListByID(ctx, id); err != nil {
|
||||
return gtserror.NewErrorInternalError(err)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue