diff options
author | 2022-12-08 17:35:14 +0000 | |
---|---|---|
committer | 2022-12-08 18:35:14 +0100 | |
commit | e58d2d81226c4cc4110747305d083b67903d621c (patch) | |
tree | 249f8b3f4732ccdb1e77b2d4243fafb4ee4c1c86 /internal/typeutils | |
parent | [chore] Remove deprecated linters (#1228) (diff) | |
download | gotosocial-e58d2d81226c4cc4110747305d083b67903d621c.tar.xz |
[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>
Diffstat (limited to 'internal/typeutils')
-rw-r--r-- | internal/typeutils/internal.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/internal/typeutils/internal.go b/internal/typeutils/internal.go index ce2c942fd..f0c501fa9 100644 --- a/internal/typeutils/internal.go +++ b/internal/typeutils/internal.go @@ -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 != "" { |