[chore] Add interaction policy gtsmodels (#3075)

* [chore] introduce interaction policy gts models

* update migration a smidge

* fix copy paste typo

* update migration

* use int for InteractionType
This commit is contained in:
tobi 2024-07-11 16:44:29 +02:00 committed by GitHub
commit 5bc567196b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
46 changed files with 1318 additions and 531 deletions

View file

@ -62,11 +62,6 @@ func (p *Processor) getFaveableStatus(
return nil, nil, errWithCode
}
if !*target.Likeable {
err := errors.New("status is not faveable")
return nil, nil, gtserror.NewErrorForbidden(err, err.Error())
}
fave, err := p.state.DB.GetStatusFave(ctx, requester.ID, target.ID)
if err != nil && !errors.Is(err, db.ErrNoEntries) {
err = fmt.Errorf("getFaveTarget: error checking existing fave: %w", err)