This commit is contained in:
tsmethurst 2021-06-29 16:31:11 +02:00
commit 3f546e8b32
4 changed files with 36 additions and 36 deletions

View file

@ -21,25 +21,25 @@ package account
import "github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
func (p *processor) Delete(account *gtsmodel.Account) error {
// TODO in this function:
// 1. Delete account's application(s), clients, and oauth tokens
// 2. Delete account's blocks
// 3. Delete account's emoji
// 4. Delete account's follow requests
// 5. Delete account's follows
// 6. Delete account's follow requests
// 7. Delete account's media attachments
// 8. Delete account's mentions
// 9. Delete account's notifications
// 10. Delete account's polls
// 11. Delete account's statuses
// 12. Delete account's bookmarks
// 13. Delete account's faves
// 14. Delete account's mutes
// 15. Delete account's streams
// 16. Delete account's tags
// 17. Delete account's user
// 18. Delete account's timeline
// TODO in this function:
// 1. Delete account's application(s), clients, and oauth tokens
// 2. Delete account's blocks
// 3. Delete account's emoji
// 4. Delete account's follow requests
// 5. Delete account's follows
// 6. Delete account's follow requests
// 7. Delete account's media attachments
// 8. Delete account's mentions
// 9. Delete account's notifications
// 10. Delete account's polls
// 11. Delete account's statuses
// 12. Delete account's bookmarks
// 13. Delete account's faves
// 14. Delete account's mutes
// 15. Delete account's streams
// 16. Delete account's tags
// 17. Delete account's user
// 18. Delete account's timeline
return nil
return nil
}

View file

@ -36,14 +36,14 @@ func (p *processor) Get(requestingAccount *gtsmodel.Account, targetAccountID str
return nil, fmt.Errorf("db error: %s", err)
}
// lazily dereference things on the account if it hasn't been done yet
var requestingUsername string
if requestingAccount != nil {
requestingUsername = requestingAccount.Username
}
if err := p.federator.DereferenceAccountFields(targetAccount, requestingUsername, false); err != nil {
p.log.WithField("func", "AccountGet").Debugf("dereferencing account: %s", err)
}
// lazily dereference things on the account if it hasn't been done yet
var requestingUsername string
if requestingAccount != nil {
requestingUsername = requestingAccount.Username
}
if err := p.federator.DereferenceAccountFields(targetAccount, requestingUsername, false); err != nil {
p.log.WithField("func", "AccountGet").Debugf("dereferencing account: %s", err)
}
var mastoAccount *apimodel.Account
var err error