mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[chore] move caches to a separate State{} structure (#1078)
* move caches to a separate State{} structure Signed-off-by: kim <grufwub@gmail.com> * fix call to log.Panic not using formatted call Signed-off-by: kim <grufwub@gmail.com> * move caches to use interfaces, to make switchouts easier in future Signed-off-by: kim <grufwub@gmail.com> * fix rebase issue Signed-off-by: kim <grufwub@gmail.com> * improve code comment Signed-off-by: kim <grufwub@gmail.com> * fix further issues after rebase Signed-off-by: kim <grufwub@gmail.com> * heh Signed-off-by: kim <grufwub@gmail.com> * add missing license text Signed-off-by: kim <grufwub@gmail.com> Signed-off-by: kim <grufwub@gmail.com>
This commit is contained in:
@ -2,7 +2,6 @@ package typeutils
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
|
||||
@ -13,7 +12,6 @@ import (
|
||||
func (c *converter) FollowRequestToFollow(ctx context.Context, f *gtsmodel.FollowRequest) *gtsmodel.Follow {
|
||||
showReblogs := *f.ShowReblogs
|
||||
notify := *f.Notify
|
||||
|
||||
return >smodel.Follow{
|
||||
ID: f.ID,
|
||||
CreatedAt: f.CreatedAt,
|
||||
@ -33,8 +31,9 @@ func (c *converter) StatusToBoost(ctx context.Context, s *gtsmodel.Status, boost
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
boostWrapperStatusURI := fmt.Sprintf("%s/%s", accountURIs.StatusesURI, boostWrapperStatusID)
|
||||
boostWrapperStatusURL := fmt.Sprintf("%s/%s", accountURIs.StatusesURL, boostWrapperStatusID)
|
||||
|
||||
boostWrapperStatusURI := accountURIs.StatusesURI + "/" + boostWrapperStatusID
|
||||
boostWrapperStatusURL := accountURIs.StatusesURL + "/" + boostWrapperStatusID
|
||||
|
||||
local := true
|
||||
if boostingAccount.Domain != "" {
|
||||
|
Reference in New Issue
Block a user