diff options
author | 2021-05-30 13:12:00 +0200 | |
---|---|---|
committer | 2021-05-30 13:12:00 +0200 | |
commit | 3d77f81c7fed002c628db82d822cc46c56a57e64 (patch) | |
tree | ba6eea80246fc2b1466ccc1435f50a3f63fd02df /internal/api | |
parent | fix some lil bugs in search (diff) | |
download | gotosocial-3d77f81c7fed002c628db82d822cc46c56a57e64.tar.xz |
Move a lot of stuff + tidy stuff (#37)
Lots of renaming and moving stuff, some bug fixes, more lenient parsing of notifications and home timeline.
Diffstat (limited to 'internal/api')
24 files changed, 70 insertions, 66 deletions
diff --git a/internal/api/client/account/account.go b/internal/api/client/account/account.go index 94f753825..3a820c0ea 100644 --- a/internal/api/client/account/account.go +++ b/internal/api/client/account/account.go @@ -26,7 +26,7 @@ import ( "github.com/sirupsen/logrus" "github.com/superseriousbusiness/gotosocial/internal/api" "github.com/superseriousbusiness/gotosocial/internal/config" - "github.com/superseriousbusiness/gotosocial/internal/message" + "github.com/superseriousbusiness/gotosocial/internal/processing" "github.com/superseriousbusiness/gotosocial/internal/router" ) @@ -61,7 +61,7 @@ const ( GetFollowingPath = BasePathWithID + "/following" // GetRelationshipsPath is for showing an account's relationship with other accounts GetRelationshipsPath = BasePath + "/relationships" - // FollowPath is for POSTing new follows to, and updating existing follows + // PostFollowPath is for POSTing new follows to, and updating existing follows PostFollowPath = BasePathWithID + "/follow" // PostUnfollowPath is for POSTing an unfollow PostUnfollowPath = BasePathWithID + "/unfollow" @@ -70,12 +70,12 @@ const ( // Module implements the ClientAPIModule interface for account-related actions type Module struct { config *config.Config - processor message.Processor + processor processing.Processor log *logrus.Logger } // New returns a new account module -func New(config *config.Config, processor message.Processor, log *logrus.Logger) api.ClientModule { +func New(config *config.Config, processor processing.Processor, log *logrus.Logger) api.ClientModule { return &Module{ config: config, processor: processor, diff --git a/internal/api/client/account/account_test.go b/internal/api/client/account/account_test.go index d0560bcb6..5e1959cc2 100644 --- a/internal/api/client/account/account_test.go +++ b/internal/api/client/account/account_test.go @@ -4,13 +4,13 @@ import ( "github.com/sirupsen/logrus" "github.com/stretchr/testify/suite" "github.com/superseriousbusiness/gotosocial/internal/api/client/account" + "github.com/superseriousbusiness/gotosocial/internal/blob" "github.com/superseriousbusiness/gotosocial/internal/config" "github.com/superseriousbusiness/gotosocial/internal/db" "github.com/superseriousbusiness/gotosocial/internal/federation" "github.com/superseriousbusiness/gotosocial/internal/gtsmodel" - "github.com/superseriousbusiness/gotosocial/internal/message" "github.com/superseriousbusiness/gotosocial/internal/oauth" - "github.com/superseriousbusiness/gotosocial/internal/storage" + "github.com/superseriousbusiness/gotosocial/internal/processing" "github.com/superseriousbusiness/gotosocial/internal/typeutils" ) @@ -22,9 +22,9 @@ type AccountStandardTestSuite struct { db db.DB log *logrus.Logger tc typeutils.TypeConverter - storage storage.Storage + storage blob.Storage federator federation.Federator - processor message.Processor + processor processing.Processor // standard suite models testTokens map[string]*oauth.Token diff --git a/internal/api/client/account/following.go b/internal/api/client/account/following.go index 2a1373e40..f1adeac2b 100644 --- a/internal/api/client/account/following.go +++ b/internal/api/client/account/following.go @@ -25,7 +25,7 @@ import ( "github.com/superseriousbusiness/gotosocial/internal/oauth" ) -// AccountFollowersGETHandler serves the followers of the requested account, if they're visible to the requester. +// AccountFollowingGETHandler serves the following of the requested account, if they're visible to the requester. func (m *Module) AccountFollowingGETHandler(c *gin.Context) { authed, err := oauth.Authed(c, true, true, true, true) if err != nil { diff --git a/internal/api/client/admin/admin.go b/internal/api/client/admin/admin.go index 7ce5311eb..b33813a7d 100644 --- a/internal/api/client/admin/admin.go +++ b/internal/api/client/admin/admin.go @@ -24,7 +24,7 @@ import ( "github.com/sirupsen/logrus" "github.com/superseriousbusiness/gotosocial/internal/api" "github.com/superseriousbusiness/gotosocial/internal/config" - "github.com/superseriousbusiness/gotosocial/internal/message" + "github.com/superseriousbusiness/gotosocial/internal/processing" "github.com/superseriousbusiness/gotosocial/internal/router" ) @@ -38,12 +38,12 @@ const ( // Module implements the ClientAPIModule interface for admin-related actions (reports, emojis, etc) type Module struct { config *config.Config - processor message.Processor + processor processing.Processor log *logrus.Logger } // New returns a new admin module -func New(config *config.Config, processor message.Processor, log *logrus.Logger) api.ClientModule { +func New(config *config.Config, processor processing.Processor, log *logrus.Logger) api.ClientModule { return &Module{ config: config, processor: processor, diff --git a/internal/api/client/app/app.go b/internal/api/client/app/app.go index d1e732a8c..0366ae21f 100644 --- a/internal/api/client/app/app.go +++ b/internal/api/client/app/app.go @@ -24,7 +24,7 @@ import ( "github.com/sirupsen/logrus" "github.com/superseriousbusiness/gotosocial/internal/api" "github.com/superseriousbusiness/gotosocial/internal/config" - "github.com/superseriousbusiness/gotosocial/internal/message" + "github.com/superseriousbusiness/gotosocial/internal/processing" "github.com/superseriousbusiness/gotosocial/internal/router" ) @@ -34,12 +34,12 @@ const BasePath = "/api/v1/apps" // Module implements the ClientAPIModule interface for requests relating to registering/removing applications type Module struct { config *config.Config - processor message.Processor + processor processing.Processor log *logrus.Logger } // New returns a new auth module -func New(config *config.Config, processor message.Processor, log *logrus.Logger) api.ClientModule { +func New(config *config.Config, processor processing.Processor, log *logrus.Logger) api.ClientModule { return &Module{ config: config, processor: processor, diff --git a/internal/api/client/fileserver/fileserver.go b/internal/api/client/fileserver/fileserver.go index 63d323a01..b06f48067 100644 --- a/internal/api/client/fileserver/fileserver.go +++ b/internal/api/client/fileserver/fileserver.go @@ -27,7 +27,7 @@ import ( "github.com/superseriousbusiness/gotosocial/internal/config" "github.com/superseriousbusiness/gotosocial/internal/db" "github.com/superseriousbusiness/gotosocial/internal/gtsmodel" - "github.com/superseriousbusiness/gotosocial/internal/message" + "github.com/superseriousbusiness/gotosocial/internal/processing" "github.com/superseriousbusiness/gotosocial/internal/router" ) @@ -46,13 +46,13 @@ const ( // The goal here is to serve requested media files if the gotosocial server is configured to use local storage. type FileServer struct { config *config.Config - processor message.Processor + processor processing.Processor log *logrus.Logger storageBase string } // New returns a new fileServer module -func New(config *config.Config, processor message.Processor, log *logrus.Logger) api.ClientModule { +func New(config *config.Config, processor processing.Processor, log *logrus.Logger) api.ClientModule { return &FileServer{ config: config, processor: processor, diff --git a/internal/api/client/fileserver/servefile_test.go b/internal/api/client/fileserver/servefile_test.go index 09fd8ea43..2646da24d 100644 --- a/internal/api/client/fileserver/servefile_test.go +++ b/internal/api/client/fileserver/servefile_test.go @@ -31,14 +31,14 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/suite" "github.com/superseriousbusiness/gotosocial/internal/api/client/fileserver" + "github.com/superseriousbusiness/gotosocial/internal/blob" "github.com/superseriousbusiness/gotosocial/internal/config" "github.com/superseriousbusiness/gotosocial/internal/db" "github.com/superseriousbusiness/gotosocial/internal/federation" "github.com/superseriousbusiness/gotosocial/internal/gtsmodel" "github.com/superseriousbusiness/gotosocial/internal/media" - "github.com/superseriousbusiness/gotosocial/internal/message" "github.com/superseriousbusiness/gotosocial/internal/oauth" - "github.com/superseriousbusiness/gotosocial/internal/storage" + "github.com/superseriousbusiness/gotosocial/internal/processing" "github.com/superseriousbusiness/gotosocial/internal/typeutils" "github.com/superseriousbusiness/gotosocial/testrig" ) @@ -49,10 +49,10 @@ type ServeFileTestSuite struct { config *config.Config db db.DB log *logrus.Logger - storage storage.Storage + storage blob.Storage federator federation.Federator tc typeutils.TypeConverter - processor message.Processor + processor processing.Processor mediaHandler media.Handler oauthServer oauth.Server diff --git a/internal/api/client/followrequest/followrequest.go b/internal/api/client/followrequest/followrequest.go index 8be957009..71352294c 100644 --- a/internal/api/client/followrequest/followrequest.go +++ b/internal/api/client/followrequest/followrequest.go @@ -24,7 +24,7 @@ import ( "github.com/sirupsen/logrus" "github.com/superseriousbusiness/gotosocial/internal/api" "github.com/superseriousbusiness/gotosocial/internal/config" - "github.com/superseriousbusiness/gotosocial/internal/message" + "github.com/superseriousbusiness/gotosocial/internal/processing" "github.com/superseriousbusiness/gotosocial/internal/router" ) @@ -46,12 +46,12 @@ const ( // Module implements the ClientAPIModule interface for every related to interacting with follow requests type Module struct { config *config.Config - processor message.Processor + processor processing.Processor log *logrus.Logger } // New returns a new follow request module -func New(config *config.Config, processor message.Processor, log *logrus.Logger) api.ClientModule { +func New(config *config.Config, processor processing.Processor, log *logrus.Logger) api.ClientModule { return &Module{ config: config, processor: processor, diff --git a/internal/api/client/instance/instance.go b/internal/api/client/instance/instance.go index ba54480a5..7fb08f29c 100644 --- a/internal/api/client/instance/instance.go +++ b/internal/api/client/instance/instance.go @@ -6,7 +6,7 @@ import ( "github.com/sirupsen/logrus" "github.com/superseriousbusiness/gotosocial/internal/api" "github.com/superseriousbusiness/gotosocial/internal/config" - "github.com/superseriousbusiness/gotosocial/internal/message" + "github.com/superseriousbusiness/gotosocial/internal/processing" "github.com/superseriousbusiness/gotosocial/internal/router" ) @@ -18,12 +18,12 @@ const ( // Module implements the ClientModule interface type Module struct { config *config.Config - processor message.Processor + processor processing.Processor log *logrus.Logger } // New returns a new instance information module -func New(config *config.Config, processor message.Processor, log *logrus.Logger) api.ClientModule { +func New(config *config.Config, processor processing.Processor, log *logrus.Logger) api.ClientModule { return &Module{ config: config, processor: processor, diff --git a/internal/api/client/media/media.go b/internal/api/client/media/media.go index f68a73c2c..05058e2e2 100644 --- a/internal/api/client/media/media.go +++ b/internal/api/client/media/media.go @@ -27,7 +27,7 @@ import ( "github.com/superseriousbusiness/gotosocial/internal/config" "github.com/superseriousbusiness/gotosocial/internal/db" "github.com/superseriousbusiness/gotosocial/internal/gtsmodel" - "github.com/superseriousbusiness/gotosocial/internal/message" + "github.com/superseriousbusiness/gotosocial/internal/processing" "github.com/superseriousbusiness/gotosocial/internal/router" ) @@ -43,12 +43,12 @@ const BasePathWithID = BasePath + "/:" + IDKey // Module implements the ClientAPIModule interface for media type Module struct { config *config.Config - processor message.Processor + processor processing.Processor log *logrus.Logger } // New returns a new auth module -func New(config *config.Config, processor message.Processor, log *logrus.Logger) api.ClientModule { +func New(config *config.Config, processor processing.Processor, log *logrus.Logger) api.ClientModule { return &Module{ config: config, processor: processor, diff --git a/internal/api/client/media/mediacreate_test.go b/internal/api/client/media/mediacreate_test.go index e86c66021..bed588017 100644 --- a/internal/api/client/media/mediacreate_test.go +++ b/internal/api/client/media/mediacreate_test.go @@ -34,14 +34,14 @@ import ( "github.com/stretchr/testify/suite" mediamodule "github.com/superseriousbusiness/gotosocial/internal/api/client/media" "github.com/superseriousbusiness/gotosocial/internal/api/model" + "github.com/superseriousbusiness/gotosocial/internal/blob" "github.com/superseriousbusiness/gotosocial/internal/config" "github.com/superseriousbusiness/gotosocial/internal/db" "github.com/superseriousbusiness/gotosocial/internal/federation" "github.com/superseriousbusiness/gotosocial/internal/gtsmodel" "github.com/superseriousbusiness/gotosocial/internal/media" - "github.com/superseriousbusiness/gotosocial/internal/message" "github.com/superseriousbusiness/gotosocial/internal/oauth" - "github.com/superseriousbusiness/gotosocial/internal/storage" + "github.com/superseriousbusiness/gotosocial/internal/processing" "github.com/superseriousbusiness/gotosocial/internal/typeutils" "github.com/superseriousbusiness/gotosocial/testrig" ) @@ -52,12 +52,12 @@ type MediaCreateTestSuite struct { config *config.Config db db.DB log *logrus.Logger - storage storage.Storage + storage blob.Storage federator federation.Federator tc typeutils.TypeConverter mediaHandler media.Handler oauthServer oauth.Server - processor message.Processor + processor processing.Processor // standard suite models testTokens map[string]*oauth.Token diff --git a/internal/api/client/notification/notification.go b/internal/api/client/notification/notification.go index bc06b31e4..799d0a5e3 100644 --- a/internal/api/client/notification/notification.go +++ b/internal/api/client/notification/notification.go @@ -24,7 +24,7 @@ import ( "github.com/sirupsen/logrus" "github.com/superseriousbusiness/gotosocial/internal/api" "github.com/superseriousbusiness/gotosocial/internal/config" - "github.com/superseriousbusiness/gotosocial/internal/message" + "github.com/superseriousbusiness/gotosocial/internal/processing" "github.com/superseriousbusiness/gotosocial/internal/router" ) @@ -39,19 +39,19 @@ const ( // MaxIDKey is the url query for setting a max notification ID to return MaxIDKey = "max_id" - // Limit key is for specifying maximum number of notifications to return. + // LimitKey is for specifying maximum number of notifications to return. LimitKey = "limit" ) // Module implements the ClientAPIModule interface for every related to posting/deleting/interacting with notifications type Module struct { config *config.Config - processor message.Processor + processor processing.Processor log *logrus.Logger } // New returns a new notification module -func New(config *config.Config, processor message.Processor, log *logrus.Logger) api.ClientModule { +func New(config *config.Config, processor processing.Processor, log *logrus.Logger) api.ClientModule { return &Module{ config: config, processor: processor, diff --git a/internal/api/client/notification/notificationsget.go b/internal/api/client/notification/notificationsget.go index 3e4970800..a2d049384 100644 --- a/internal/api/client/notification/notificationsget.go +++ b/internal/api/client/notification/notificationsget.go @@ -27,6 +27,7 @@ import ( "github.com/superseriousbusiness/gotosocial/internal/oauth" ) +// NotificationsGETHandler serves a list of notifications to the caller, with the desired query parameters func (m *Module) NotificationsGETHandler(c *gin.Context) { l := m.log.WithFields(logrus.Fields{ "func": "NotificationsGETHandler", diff --git a/internal/api/client/search/search.go b/internal/api/client/search/search.go index b89ae1a74..1cffee5e0 100644 --- a/internal/api/client/search/search.go +++ b/internal/api/client/search/search.go @@ -24,12 +24,12 @@ import ( "github.com/sirupsen/logrus" "github.com/superseriousbusiness/gotosocial/internal/api" "github.com/superseriousbusiness/gotosocial/internal/config" - "github.com/superseriousbusiness/gotosocial/internal/message" + "github.com/superseriousbusiness/gotosocial/internal/processing" "github.com/superseriousbusiness/gotosocial/internal/router" ) const ( - // BasePath is the base path for serving v1 of the search API + // BasePathV1 is the base path for serving v1 of the search API BasePathV1 = "/api/v1/search" // BasePathV2 is the base path for serving v2 of the search API @@ -67,12 +67,12 @@ const ( // Module implements the ClientAPIModule interface for everything related to searching type Module struct { config *config.Config - processor message.Processor + processor processing.Processor log *logrus.Logger } // New returns a new search module -func New(config *config.Config, processor message.Processor, log *logrus.Logger) api.ClientModule { +func New(config *config.Config, processor processing.Processor, log *logrus.Logger) api.ClientModule { return &Module{ config: config, processor: processor, diff --git a/internal/api/client/status/status.go b/internal/api/client/status/status.go index a91f1fa67..e71764eb1 100644 --- a/internal/api/client/status/status.go +++ b/internal/api/client/status/status.go @@ -26,7 +26,7 @@ import ( "github.com/sirupsen/logrus" "github.com/superseriousbusiness/gotosocial/internal/api" "github.com/superseriousbusiness/gotosocial/internal/config" - "github.com/superseriousbusiness/gotosocial/internal/message" + "github.com/superseriousbusiness/gotosocial/internal/processing" "github.com/superseriousbusiness/gotosocial/internal/router" ) @@ -75,12 +75,12 @@ const ( // Module implements the ClientAPIModule interface for every related to posting/deleting/interacting with statuses type Module struct { config *config.Config - processor message.Processor + processor processing.Processor log *logrus.Logger } // New returns a new account module -func New(config *config.Config, processor message.Processor, log *logrus.Logger) api.ClientModule { +func New(config *config.Config, processor processing.Processor, log *logrus.Logger) api.ClientModule { return &Module{ config: config, processor: processor, diff --git a/internal/api/client/status/status_test.go b/internal/api/client/status/status_test.go index 0f77820a1..563a23ce2 100644 --- a/internal/api/client/status/status_test.go +++ b/internal/api/client/status/status_test.go @@ -22,13 +22,13 @@ import ( "github.com/sirupsen/logrus" "github.com/stretchr/testify/suite" "github.com/superseriousbusiness/gotosocial/internal/api/client/status" + "github.com/superseriousbusiness/gotosocial/internal/blob" "github.com/superseriousbusiness/gotosocial/internal/config" "github.com/superseriousbusiness/gotosocial/internal/db" "github.com/superseriousbusiness/gotosocial/internal/federation" "github.com/superseriousbusiness/gotosocial/internal/gtsmodel" - "github.com/superseriousbusiness/gotosocial/internal/message" "github.com/superseriousbusiness/gotosocial/internal/oauth" - "github.com/superseriousbusiness/gotosocial/internal/storage" + "github.com/superseriousbusiness/gotosocial/internal/processing" "github.com/superseriousbusiness/gotosocial/internal/typeutils" ) @@ -41,8 +41,8 @@ type StatusStandardTestSuite struct { log *logrus.Logger tc typeutils.TypeConverter federator federation.Federator - processor message.Processor - storage storage.Storage + processor processing.Processor + storage blob.Storage // standard suite models testTokens map[string]*oauth.Token diff --git a/internal/api/client/timeline/timeline.go b/internal/api/client/timeline/timeline.go index 84674132c..f563d6b7d 100644 --- a/internal/api/client/timeline/timeline.go +++ b/internal/api/client/timeline/timeline.go @@ -24,7 +24,7 @@ import ( "github.com/sirupsen/logrus" "github.com/superseriousbusiness/gotosocial/internal/api" "github.com/superseriousbusiness/gotosocial/internal/config" - "github.com/superseriousbusiness/gotosocial/internal/message" + "github.com/superseriousbusiness/gotosocial/internal/processing" "github.com/superseriousbusiness/gotosocial/internal/router" ) @@ -39,7 +39,7 @@ const ( SinceIDKey = "since_id" // MinIDKey is the url query for returning results immediately newer than the given ID MinIDKey = "min_id" - // Limit key is for specifying maximum number of results to return. + // LimitKey is for specifying maximum number of results to return. LimitKey = "limit" // LocalKey is for specifying whether only local statuses should be returned LocalKey = "local" @@ -48,12 +48,12 @@ const ( // Module implements the ClientAPIModule interface for everything relating to viewing timelines type Module struct { config *config.Config - processor message.Processor + processor processing.Processor log *logrus.Logger } // New returns a new timeline module -func New(config *config.Config, processor message.Processor, log *logrus.Logger) api.ClientModule { +func New(config *config.Config, processor processing.Processor, log *logrus.Logger) api.ClientModule { return &Module{ config: config, processor: processor, diff --git a/internal/api/s2s/user/followers.go b/internal/api/s2s/user/followers.go index 0b633619f..9ccf9c4d5 100644 --- a/internal/api/s2s/user/followers.go +++ b/internal/api/s2s/user/followers.go @@ -25,6 +25,7 @@ import ( "github.com/sirupsen/logrus" ) +// FollowersGETHandler returns a collection of URIs for followers of the target user, formatted so that other AP servers can understand it. func (m *Module) FollowersGETHandler(c *gin.Context) { l := m.log.WithFields(logrus.Fields{ "func": "FollowersGETHandler", diff --git a/internal/api/s2s/user/following.go b/internal/api/s2s/user/following.go index de5701f8d..f19965c26 100644 --- a/internal/api/s2s/user/following.go +++ b/internal/api/s2s/user/following.go @@ -25,6 +25,7 @@ import ( "github.com/sirupsen/logrus" ) +// FollowingGETHandler returns a collection of URIs for accounts that the target user follows, formatted so that other AP servers can understand it. func (m *Module) FollowingGETHandler(c *gin.Context) { l := m.log.WithFields(logrus.Fields{ "func": "FollowingGETHandler", diff --git a/internal/api/s2s/user/inboxpost.go b/internal/api/s2s/user/inboxpost.go index 60b74ab70..642ba6498 100644 --- a/internal/api/s2s/user/inboxpost.go +++ b/internal/api/s2s/user/inboxpost.go @@ -23,7 +23,7 @@ import ( "github.com/gin-gonic/gin" "github.com/sirupsen/logrus" - "github.com/superseriousbusiness/gotosocial/internal/message" + "github.com/superseriousbusiness/gotosocial/internal/processing" ) // InboxPOSTHandler deals with incoming POST requests to an actor's inbox. @@ -42,7 +42,7 @@ func (m *Module) InboxPOSTHandler(c *gin.Context) { posted, err := m.processor.InboxPost(c.Request.Context(), c.Writer, c.Request) if err != nil { - if withCode, ok := err.(message.ErrorWithCode); ok { + if withCode, ok := err.(processing.ErrorWithCode); ok { l.Debug(withCode.Error()) c.JSON(withCode.Code(), withCode.Safe()) return diff --git a/internal/api/s2s/user/statusget.go b/internal/api/s2s/user/statusget.go index 60efd484e..22774ae2c 100644 --- a/internal/api/s2s/user/statusget.go +++ b/internal/api/s2s/user/statusget.go @@ -7,6 +7,7 @@ import ( "github.com/sirupsen/logrus" ) +// StatusGETHandler serves the target status as an activitystreams NOTE so that other AP servers can parse it. func (m *Module) StatusGETHandler(c *gin.Context) { l := m.log.WithFields(logrus.Fields{ "func": "StatusGETHandler", diff --git a/internal/api/s2s/user/user.go b/internal/api/s2s/user/user.go index e1bdb9a8d..ffb308038 100644 --- a/internal/api/s2s/user/user.go +++ b/internal/api/s2s/user/user.go @@ -24,7 +24,7 @@ import ( "github.com/sirupsen/logrus" "github.com/superseriousbusiness/gotosocial/internal/api" "github.com/superseriousbusiness/gotosocial/internal/config" - "github.com/superseriousbusiness/gotosocial/internal/message" + "github.com/superseriousbusiness/gotosocial/internal/processing" "github.com/superseriousbusiness/gotosocial/internal/router" "github.com/superseriousbusiness/gotosocial/internal/util" ) @@ -60,12 +60,12 @@ var ActivityPubAcceptHeaders = []string{ // Module implements the FederationAPIModule interface type Module struct { config *config.Config - processor message.Processor + processor processing.Processor log *logrus.Logger } // New returns a new auth module -func New(config *config.Config, processor message.Processor, log *logrus.Logger) api.FederationModule { +func New(config *config.Config, processor processing.Processor, log *logrus.Logger) api.FederationModule { return &Module{ config: config, processor: processor, diff --git a/internal/api/s2s/user/user_test.go b/internal/api/s2s/user/user_test.go index 84e35ab68..91d1ea32d 100644 --- a/internal/api/s2s/user/user_test.go +++ b/internal/api/s2s/user/user_test.go @@ -4,13 +4,13 @@ import ( "github.com/sirupsen/logrus" "github.com/stretchr/testify/suite" "github.com/superseriousbusiness/gotosocial/internal/api/s2s/user" + "github.com/superseriousbusiness/gotosocial/internal/blob" "github.com/superseriousbusiness/gotosocial/internal/config" "github.com/superseriousbusiness/gotosocial/internal/db" "github.com/superseriousbusiness/gotosocial/internal/federation" "github.com/superseriousbusiness/gotosocial/internal/gtsmodel" - "github.com/superseriousbusiness/gotosocial/internal/message" "github.com/superseriousbusiness/gotosocial/internal/oauth" - "github.com/superseriousbusiness/gotosocial/internal/storage" + "github.com/superseriousbusiness/gotosocial/internal/processing" "github.com/superseriousbusiness/gotosocial/internal/typeutils" ) @@ -23,8 +23,8 @@ type UserStandardTestSuite struct { log *logrus.Logger tc typeutils.TypeConverter federator federation.Federator - processor message.Processor - storage storage.Storage + processor processing.Processor + storage blob.Storage // standard suite models testTokens map[string]*oauth.Token diff --git a/internal/api/s2s/webfinger/webfinger.go b/internal/api/s2s/webfinger/webfinger.go index 168fe1e76..6d48dc80a 100644 --- a/internal/api/s2s/webfinger/webfinger.go +++ b/internal/api/s2s/webfinger/webfinger.go @@ -24,7 +24,7 @@ import ( "github.com/sirupsen/logrus" "github.com/superseriousbusiness/gotosocial/internal/api" "github.com/superseriousbusiness/gotosocial/internal/config" - "github.com/superseriousbusiness/gotosocial/internal/message" + "github.com/superseriousbusiness/gotosocial/internal/processing" "github.com/superseriousbusiness/gotosocial/internal/router" ) @@ -36,12 +36,12 @@ const ( // Module implements the FederationModule interface type Module struct { config *config.Config - processor message.Processor + processor processing.Processor log *logrus.Logger } // New returns a new webfinger module -func New(config *config.Config, processor message.Processor, log *logrus.Logger) api.FederationModule { +func New(config *config.Config, processor processing.Processor, log *logrus.Logger) api.FederationModule { return &Module{ config: config, processor: processor, |