diff --git a/cmd/gotosocial/action/server/server.go b/cmd/gotosocial/action/server/server.go
index d5ac50934..efedda9ec 100644
--- a/cmd/gotosocial/action/server/server.go
+++ b/cmd/gotosocial/action/server/server.go
@@ -32,7 +32,7 @@ import (
"github.com/KimMachineGun/automemlimit/memlimit"
"github.com/gin-gonic/gin"
"github.com/superseriousbusiness/gotosocial/cmd/gotosocial/action"
- "github.com/superseriousbusiness/gotosocial/internal/actions"
+ "github.com/superseriousbusiness/gotosocial/internal/admin"
"github.com/superseriousbusiness/gotosocial/internal/api"
apiutil "github.com/superseriousbusiness/gotosocial/internal/api/util"
"github.com/superseriousbusiness/gotosocial/internal/cleaner"
@@ -168,7 +168,7 @@ var Start action.GTSAction = func(ctx context.Context) error {
// Set Actions on state, providing workers to
// Actions as well for triggering side effects.
- state.Actions = actions.New(dbService, &state.Workers)
+ state.AdminActions = admin.New(dbService, &state.Workers)
// Ensure necessary database instance prerequisites exist.
if err := dbService.CreateInstanceAccount(ctx); err != nil {
diff --git a/internal/actions/actions.go b/internal/admin/actions.go
similarity index 99%
rename from internal/actions/actions.go
rename to internal/admin/actions.go
index b872a1ffd..6d031519f 100644
--- a/internal/actions/actions.go
+++ b/internal/admin/actions.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see .
-package actions
+package admin
import (
"context"
diff --git a/internal/actions/actions_test.go b/internal/admin/actions_test.go
similarity index 91%
rename from internal/actions/actions_test.go
rename to internal/admin/actions_test.go
index 37ca06d01..c5084d955 100644
--- a/internal/actions/actions_test.go
+++ b/internal/admin/actions_test.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see .
-package actions_test
+package admin_test
import (
"context"
@@ -75,7 +75,7 @@ func (suite *ActionsTestSuite) TestActionOverlap() {
key2 := action2.Key()
suite.Equal("account/01H90S1CXQ97J9625C5YBXZWGT", key2)
- errWithCode := testStructs.State.Actions.Run(
+ errWithCode := testStructs.State.AdminActions.Run(
ctx,
action1,
func(ctx context.Context) gtserror.MultiError {
@@ -88,7 +88,7 @@ func (suite *ActionsTestSuite) TestActionOverlap() {
// While first action is sleeping, try to
// process another with the same key.
- errWithCode = testStructs.State.Actions.Run(
+ errWithCode = testStructs.State.AdminActions.Run(
ctx,
action2,
func(ctx context.Context) gtserror.MultiError {
@@ -104,13 +104,13 @@ func (suite *ActionsTestSuite) TestActionOverlap() {
// Wait for action to finish.
if !testrig.WaitFor(func() bool {
- return testStructs.State.Actions.TotalRunning() == 0
+ return testStructs.State.AdminActions.TotalRunning() == 0
}) {
suite.FailNow("timed out waiting for admin action(s) to finish")
}
// Try again.
- errWithCode = testStructs.State.Actions.Run(
+ errWithCode = testStructs.State.AdminActions.Run(
ctx,
action2,
func(ctx context.Context) gtserror.MultiError {
@@ -121,7 +121,7 @@ func (suite *ActionsTestSuite) TestActionOverlap() {
// Wait for action to finish.
if !testrig.WaitFor(func() bool {
- return testStructs.State.Actions.TotalRunning() == 0
+ return testStructs.State.AdminActions.TotalRunning() == 0
}) {
suite.FailNow("timed out waiting for admin action(s) to finish")
}
@@ -143,7 +143,7 @@ func (suite *ActionsTestSuite) TestActionWithErrors() {
AccountID: "01H90S1ZZXP4N74H4A9RVW1MRP",
}
- errWithCode := testStructs.State.Actions.Run(
+ errWithCode := testStructs.State.AdminActions.Run(
ctx,
action,
func(ctx context.Context) gtserror.MultiError {
@@ -158,7 +158,7 @@ func (suite *ActionsTestSuite) TestActionWithErrors() {
// Wait for action to finish.
if !testrig.WaitFor(func() bool {
- return testStructs.State.Actions.TotalRunning() == 0
+ return testStructs.State.AdminActions.TotalRunning() == 0
}) {
suite.FailNow("timed out waiting for admin action(s) to finish")
}
diff --git a/internal/actions/domainkeys.go b/internal/admin/domainkeys.go
similarity index 99%
rename from internal/actions/domainkeys.go
rename to internal/admin/domainkeys.go
index 9f803cb93..019f7d2d1 100644
--- a/internal/actions/domainkeys.go
+++ b/internal/admin/domainkeys.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see .
-package actions
+package admin
import (
"context"
diff --git a/internal/actions/domainperms.go b/internal/admin/domainperms.go
similarity index 99%
rename from internal/actions/domainperms.go
rename to internal/admin/domainperms.go
index 44321dd90..c10db574d 100644
--- a/internal/actions/domainperms.go
+++ b/internal/admin/domainperms.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see .
-package actions
+package admin
import (
"context"
diff --git a/internal/actions/util.go b/internal/admin/util.go
similarity index 99%
rename from internal/actions/util.go
rename to internal/admin/util.go
index 9c64adb94..27e81fbb3 100644
--- a/internal/actions/util.go
+++ b/internal/admin/util.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see .
-package actions
+package admin
import (
"context"
diff --git a/internal/api/activitypub/emoji/emojiget_test.go b/internal/api/activitypub/emoji/emojiget_test.go
index f3e742cb5..0eb1f5931 100644
--- a/internal/api/activitypub/emoji/emojiget_test.go
+++ b/internal/api/activitypub/emoji/emojiget_test.go
@@ -25,7 +25,7 @@ import (
"github.com/gin-gonic/gin"
"github.com/stretchr/testify/suite"
- "github.com/superseriousbusiness/gotosocial/internal/actions"
+ "github.com/superseriousbusiness/gotosocial/internal/admin"
"github.com/superseriousbusiness/gotosocial/internal/api/activitypub/emoji"
"github.com/superseriousbusiness/gotosocial/internal/db"
"github.com/superseriousbusiness/gotosocial/internal/email"
@@ -74,7 +74,7 @@ func (suite *EmojiGetTestSuite) SetupTest() {
suite.db = testrig.NewTestDB(&suite.state)
suite.state.DB = suite.db
- suite.state.Actions = actions.New(suite.state.DB, &suite.state.Workers)
+ suite.state.AdminActions = admin.New(suite.state.DB, &suite.state.Workers)
suite.storage = testrig.NewInMemoryStorage()
suite.state.Storage = suite.storage
suite.tc = typeutils.NewConverter(&suite.state)
diff --git a/internal/api/activitypub/users/user_test.go b/internal/api/activitypub/users/user_test.go
index e7d3d774b..10eb33937 100644
--- a/internal/api/activitypub/users/user_test.go
+++ b/internal/api/activitypub/users/user_test.go
@@ -20,7 +20,7 @@ package users_test
import (
"github.com/gin-gonic/gin"
"github.com/stretchr/testify/suite"
- "github.com/superseriousbusiness/gotosocial/internal/actions"
+ "github.com/superseriousbusiness/gotosocial/internal/admin"
"github.com/superseriousbusiness/gotosocial/internal/api/activitypub/users"
"github.com/superseriousbusiness/gotosocial/internal/db"
"github.com/superseriousbusiness/gotosocial/internal/email"
@@ -85,7 +85,7 @@ func (suite *UserStandardTestSuite) SetupTest() {
suite.db = testrig.NewTestDB(&suite.state)
suite.state.DB = suite.db
- suite.state.Actions = actions.New(suite.state.DB, &suite.state.Workers)
+ suite.state.AdminActions = admin.New(suite.state.DB, &suite.state.Workers)
suite.tc = typeutils.NewConverter(&suite.state)
testrig.StartTimelines(
diff --git a/internal/api/auth/auth_test.go b/internal/api/auth/auth_test.go
index 13c1ae5e1..c5ceba387 100644
--- a/internal/api/auth/auth_test.go
+++ b/internal/api/auth/auth_test.go
@@ -26,7 +26,7 @@ import (
"github.com/gin-contrib/sessions/memstore"
"github.com/gin-gonic/gin"
"github.com/stretchr/testify/suite"
- "github.com/superseriousbusiness/gotosocial/internal/actions"
+ "github.com/superseriousbusiness/gotosocial/internal/admin"
"github.com/superseriousbusiness/gotosocial/internal/api/auth"
"github.com/superseriousbusiness/gotosocial/internal/config"
"github.com/superseriousbusiness/gotosocial/internal/db"
@@ -85,7 +85,7 @@ func (suite *AuthStandardTestSuite) SetupTest() {
suite.db = testrig.NewTestDB(&suite.state)
suite.state.DB = suite.db
- suite.state.Actions = actions.New(suite.state.DB, &suite.state.Workers)
+ suite.state.AdminActions = admin.New(suite.state.DB, &suite.state.Workers)
suite.storage = testrig.NewInMemoryStorage()
suite.state.Storage = suite.storage
suite.mediaManager = testrig.NewTestMediaManager(&suite.state)
diff --git a/internal/api/client/accounts/account_test.go b/internal/api/client/accounts/account_test.go
index b0abf402c..db212af22 100644
--- a/internal/api/client/accounts/account_test.go
+++ b/internal/api/client/accounts/account_test.go
@@ -25,7 +25,7 @@ import (
"github.com/gin-gonic/gin"
"github.com/stretchr/testify/suite"
- "github.com/superseriousbusiness/gotosocial/internal/actions"
+ "github.com/superseriousbusiness/gotosocial/internal/admin"
"github.com/superseriousbusiness/gotosocial/internal/api/client/accounts"
"github.com/superseriousbusiness/gotosocial/internal/config"
"github.com/superseriousbusiness/gotosocial/internal/db"
@@ -86,7 +86,7 @@ func (suite *AccountStandardTestSuite) SetupTest() {
suite.db = testrig.NewTestDB(&suite.state)
suite.state.DB = suite.db
- suite.state.Actions = actions.New(suite.state.DB, &suite.state.Workers)
+ suite.state.AdminActions = admin.New(suite.state.DB, &suite.state.Workers)
suite.storage = testrig.NewInMemoryStorage()
suite.state.Storage = suite.storage
diff --git a/internal/api/client/admin/admin_test.go b/internal/api/client/admin/admin_test.go
index c7e7260cd..479f16f45 100644
--- a/internal/api/client/admin/admin_test.go
+++ b/internal/api/client/admin/admin_test.go
@@ -25,7 +25,7 @@ import (
"github.com/gin-gonic/gin"
"github.com/stretchr/testify/suite"
- "github.com/superseriousbusiness/gotosocial/internal/actions"
+ adminactions "github.com/superseriousbusiness/gotosocial/internal/admin"
"github.com/superseriousbusiness/gotosocial/internal/api/client/admin"
"github.com/superseriousbusiness/gotosocial/internal/config"
"github.com/superseriousbusiness/gotosocial/internal/db"
@@ -92,7 +92,7 @@ func (suite *AdminStandardTestSuite) SetupTest() {
suite.db = testrig.NewTestDB(&suite.state)
suite.state.DB = suite.db
- suite.state.Actions = actions.New(suite.state.DB, &suite.state.Workers)
+ suite.state.AdminActions = adminactions.New(suite.state.DB, &suite.state.Workers)
suite.storage = testrig.NewInMemoryStorage()
suite.state.Storage = suite.storage
diff --git a/internal/api/client/bookmarks/bookmarks_test.go b/internal/api/client/bookmarks/bookmarks_test.go
index 30602ad3b..43c1eeee4 100644
--- a/internal/api/client/bookmarks/bookmarks_test.go
+++ b/internal/api/client/bookmarks/bookmarks_test.go
@@ -28,7 +28,7 @@ import (
"testing"
"github.com/stretchr/testify/suite"
- "github.com/superseriousbusiness/gotosocial/internal/actions"
+ "github.com/superseriousbusiness/gotosocial/internal/admin"
"github.com/superseriousbusiness/gotosocial/internal/api/client/bookmarks"
"github.com/superseriousbusiness/gotosocial/internal/api/client/statuses"
apimodel "github.com/superseriousbusiness/gotosocial/internal/api/model"
@@ -96,7 +96,7 @@ func (suite *BookmarkTestSuite) SetupTest() {
suite.db = testrig.NewTestDB(&suite.state)
suite.state.DB = suite.db
- suite.state.Actions = actions.New(suite.state.DB, &suite.state.Workers)
+ suite.state.AdminActions = admin.New(suite.state.DB, &suite.state.Workers)
suite.storage = testrig.NewInMemoryStorage()
suite.state.Storage = suite.storage
diff --git a/internal/api/client/favourites/favourites_test.go b/internal/api/client/favourites/favourites_test.go
index 571f647fb..dcdc8fee2 100644
--- a/internal/api/client/favourites/favourites_test.go
+++ b/internal/api/client/favourites/favourites_test.go
@@ -19,7 +19,7 @@ package favourites_test
import (
"github.com/stretchr/testify/suite"
- "github.com/superseriousbusiness/gotosocial/internal/actions"
+ "github.com/superseriousbusiness/gotosocial/internal/admin"
"github.com/superseriousbusiness/gotosocial/internal/api/client/favourites"
"github.com/superseriousbusiness/gotosocial/internal/db"
"github.com/superseriousbusiness/gotosocial/internal/email"
@@ -80,7 +80,7 @@ func (suite *FavouritesStandardTestSuite) SetupTest() {
suite.db = testrig.NewTestDB(&suite.state)
suite.state.DB = suite.db
- suite.state.Actions = actions.New(suite.state.DB, &suite.state.Workers)
+ suite.state.AdminActions = admin.New(suite.state.DB, &suite.state.Workers)
suite.storage = testrig.NewInMemoryStorage()
suite.state.Storage = suite.storage
diff --git a/internal/api/client/filters/v1/filter_test.go b/internal/api/client/filters/v1/filter_test.go
index 9a8258f12..128426435 100644
--- a/internal/api/client/filters/v1/filter_test.go
+++ b/internal/api/client/filters/v1/filter_test.go
@@ -23,7 +23,7 @@ import (
"time"
"github.com/stretchr/testify/suite"
- "github.com/superseriousbusiness/gotosocial/internal/actions"
+ "github.com/superseriousbusiness/gotosocial/internal/admin"
filtersV1 "github.com/superseriousbusiness/gotosocial/internal/api/client/filters/v1"
"github.com/superseriousbusiness/gotosocial/internal/config"
"github.com/superseriousbusiness/gotosocial/internal/db"
@@ -91,7 +91,7 @@ func (suite *FiltersTestSuite) SetupTest() {
suite.db = testrig.NewTestDB(&suite.state)
suite.state.DB = suite.db
- suite.state.Actions = actions.New(suite.state.DB, &suite.state.Workers)
+ suite.state.AdminActions = admin.New(suite.state.DB, &suite.state.Workers)
suite.storage = testrig.NewInMemoryStorage()
suite.state.Storage = suite.storage
diff --git a/internal/api/client/filters/v2/filter_test.go b/internal/api/client/filters/v2/filter_test.go
index 0c13c33f7..20411c090 100644
--- a/internal/api/client/filters/v2/filter_test.go
+++ b/internal/api/client/filters/v2/filter_test.go
@@ -23,7 +23,7 @@ import (
"time"
"github.com/stretchr/testify/suite"
- "github.com/superseriousbusiness/gotosocial/internal/actions"
+ "github.com/superseriousbusiness/gotosocial/internal/admin"
filtersV2 "github.com/superseriousbusiness/gotosocial/internal/api/client/filters/v2"
"github.com/superseriousbusiness/gotosocial/internal/config"
"github.com/superseriousbusiness/gotosocial/internal/db"
@@ -91,7 +91,7 @@ func (suite *FiltersTestSuite) SetupTest() {
suite.db = testrig.NewTestDB(&suite.state)
suite.state.DB = suite.db
- suite.state.Actions = actions.New(suite.state.DB, &suite.state.Workers)
+ suite.state.AdminActions = admin.New(suite.state.DB, &suite.state.Workers)
suite.storage = testrig.NewInMemoryStorage()
suite.state.Storage = suite.storage
diff --git a/internal/api/client/followedtags/followedtags_test.go b/internal/api/client/followedtags/followedtags_test.go
index 5d46c0fa0..89a61aca1 100644
--- a/internal/api/client/followedtags/followedtags_test.go
+++ b/internal/api/client/followedtags/followedtags_test.go
@@ -21,7 +21,7 @@ import (
"testing"
"github.com/stretchr/testify/suite"
- "github.com/superseriousbusiness/gotosocial/internal/actions"
+ "github.com/superseriousbusiness/gotosocial/internal/admin"
"github.com/superseriousbusiness/gotosocial/internal/api/client/followedtags"
"github.com/superseriousbusiness/gotosocial/internal/config"
"github.com/superseriousbusiness/gotosocial/internal/db"
@@ -80,7 +80,7 @@ func (suite *FollowedTagsTestSuite) SetupTest() {
suite.db = testrig.NewTestDB(&suite.state)
suite.state.DB = suite.db
- suite.state.Actions = actions.New(suite.state.DB, &suite.state.Workers)
+ suite.state.AdminActions = admin.New(suite.state.DB, &suite.state.Workers)
suite.storage = testrig.NewInMemoryStorage()
suite.state.Storage = suite.storage
diff --git a/internal/api/client/followrequests/followrequest_test.go b/internal/api/client/followrequests/followrequest_test.go
index 46dde691c..1faac2bbc 100644
--- a/internal/api/client/followrequests/followrequest_test.go
+++ b/internal/api/client/followrequests/followrequest_test.go
@@ -24,7 +24,7 @@ import (
"github.com/gin-gonic/gin"
"github.com/stretchr/testify/suite"
- "github.com/superseriousbusiness/gotosocial/internal/actions"
+ "github.com/superseriousbusiness/gotosocial/internal/admin"
"github.com/superseriousbusiness/gotosocial/internal/api/client/followrequests"
"github.com/superseriousbusiness/gotosocial/internal/config"
"github.com/superseriousbusiness/gotosocial/internal/db"
@@ -83,7 +83,7 @@ func (suite *FollowRequestStandardTestSuite) SetupTest() {
suite.db = testrig.NewTestDB(&suite.state)
suite.state.DB = suite.db
- suite.state.Actions = actions.New(suite.state.DB, &suite.state.Workers)
+ suite.state.AdminActions = admin.New(suite.state.DB, &suite.state.Workers)
suite.storage = testrig.NewInMemoryStorage()
suite.state.Storage = suite.storage
diff --git a/internal/api/client/instance/instance_test.go b/internal/api/client/instance/instance_test.go
index 8de29b4e1..293c96020 100644
--- a/internal/api/client/instance/instance_test.go
+++ b/internal/api/client/instance/instance_test.go
@@ -24,7 +24,7 @@ import (
"github.com/gin-gonic/gin"
"github.com/stretchr/testify/suite"
- "github.com/superseriousbusiness/gotosocial/internal/actions"
+ "github.com/superseriousbusiness/gotosocial/internal/admin"
"github.com/superseriousbusiness/gotosocial/internal/api/client/instance"
"github.com/superseriousbusiness/gotosocial/internal/config"
"github.com/superseriousbusiness/gotosocial/internal/db"
@@ -85,7 +85,7 @@ func (suite *InstanceStandardTestSuite) SetupTest() {
suite.db = testrig.NewTestDB(&suite.state)
suite.state.DB = suite.db
- suite.state.Actions = actions.New(suite.state.DB, &suite.state.Workers)
+ suite.state.AdminActions = admin.New(suite.state.DB, &suite.state.Workers)
suite.storage = testrig.NewInMemoryStorage()
suite.state.Storage = suite.storage
diff --git a/internal/api/client/lists/lists_test.go b/internal/api/client/lists/lists_test.go
index f2ebfd29e..ea5adbb5c 100644
--- a/internal/api/client/lists/lists_test.go
+++ b/internal/api/client/lists/lists_test.go
@@ -19,7 +19,7 @@ package lists_test
import (
"github.com/stretchr/testify/suite"
- "github.com/superseriousbusiness/gotosocial/internal/actions"
+ "github.com/superseriousbusiness/gotosocial/internal/admin"
"github.com/superseriousbusiness/gotosocial/internal/api/client/lists"
"github.com/superseriousbusiness/gotosocial/internal/db"
"github.com/superseriousbusiness/gotosocial/internal/email"
@@ -86,7 +86,7 @@ func (suite *ListsStandardTestSuite) SetupTest() {
suite.db = testrig.NewTestDB(&suite.state)
suite.state.DB = suite.db
- suite.state.Actions = actions.New(suite.state.DB, &suite.state.Workers)
+ suite.state.AdminActions = admin.New(suite.state.DB, &suite.state.Workers)
suite.storage = testrig.NewInMemoryStorage()
suite.state.Storage = suite.storage
diff --git a/internal/api/client/mutes/mutes_test.go b/internal/api/client/mutes/mutes_test.go
index 35f6fa4e5..b721b080f 100644
--- a/internal/api/client/mutes/mutes_test.go
+++ b/internal/api/client/mutes/mutes_test.go
@@ -25,7 +25,7 @@ import (
"github.com/gin-gonic/gin"
"github.com/stretchr/testify/suite"
- "github.com/superseriousbusiness/gotosocial/internal/actions"
+ "github.com/superseriousbusiness/gotosocial/internal/admin"
"github.com/superseriousbusiness/gotosocial/internal/api/client/mutes"
"github.com/superseriousbusiness/gotosocial/internal/config"
"github.com/superseriousbusiness/gotosocial/internal/db"
@@ -82,7 +82,7 @@ func (suite *MutesTestSuite) SetupTest() {
suite.db = testrig.NewTestDB(&suite.state)
suite.state.DB = suite.db
- suite.state.Actions = actions.New(suite.state.DB, &suite.state.Workers)
+ suite.state.AdminActions = admin.New(suite.state.DB, &suite.state.Workers)
suite.storage = testrig.NewInMemoryStorage()
suite.state.Storage = suite.storage
diff --git a/internal/api/client/notifications/notifications_test.go b/internal/api/client/notifications/notifications_test.go
index 693be3d8f..39fb66691 100644
--- a/internal/api/client/notifications/notifications_test.go
+++ b/internal/api/client/notifications/notifications_test.go
@@ -19,7 +19,7 @@ package notifications_test
import (
"github.com/stretchr/testify/suite"
- "github.com/superseriousbusiness/gotosocial/internal/actions"
+ "github.com/superseriousbusiness/gotosocial/internal/admin"
"github.com/superseriousbusiness/gotosocial/internal/api/client/notifications"
"github.com/superseriousbusiness/gotosocial/internal/db"
"github.com/superseriousbusiness/gotosocial/internal/email"
@@ -82,7 +82,7 @@ func (suite *NotificationsTestSuite) SetupTest() {
suite.db = testrig.NewTestDB(&suite.state)
suite.state.DB = suite.db
- suite.state.Actions = actions.New(suite.state.DB, &suite.state.Workers)
+ suite.state.AdminActions = admin.New(suite.state.DB, &suite.state.Workers)
suite.storage = testrig.NewInMemoryStorage()
suite.state.Storage = suite.storage
diff --git a/internal/api/client/polls/polls_test.go b/internal/api/client/polls/polls_test.go
index 28cc190ba..b5552f39e 100644
--- a/internal/api/client/polls/polls_test.go
+++ b/internal/api/client/polls/polls_test.go
@@ -19,7 +19,7 @@ package polls_test
import (
"github.com/stretchr/testify/suite"
- "github.com/superseriousbusiness/gotosocial/internal/actions"
+ "github.com/superseriousbusiness/gotosocial/internal/admin"
"github.com/superseriousbusiness/gotosocial/internal/api/client/polls"
"github.com/superseriousbusiness/gotosocial/internal/db"
"github.com/superseriousbusiness/gotosocial/internal/email"
@@ -77,7 +77,7 @@ func (suite *PollsStandardTestSuite) SetupTest() {
suite.db = testrig.NewTestDB(&suite.state)
suite.state.DB = suite.db
- suite.state.Actions = actions.New(suite.state.DB, &suite.state.Workers)
+ suite.state.AdminActions = admin.New(suite.state.DB, &suite.state.Workers)
suite.storage = testrig.NewInMemoryStorage()
suite.state.Storage = suite.storage
diff --git a/internal/api/client/reports/reports_test.go b/internal/api/client/reports/reports_test.go
index af084671e..031fd953a 100644
--- a/internal/api/client/reports/reports_test.go
+++ b/internal/api/client/reports/reports_test.go
@@ -19,7 +19,7 @@ package reports_test
import (
"github.com/stretchr/testify/suite"
- "github.com/superseriousbusiness/gotosocial/internal/actions"
+ "github.com/superseriousbusiness/gotosocial/internal/admin"
"github.com/superseriousbusiness/gotosocial/internal/api/client/reports"
"github.com/superseriousbusiness/gotosocial/internal/db"
"github.com/superseriousbusiness/gotosocial/internal/email"
@@ -77,7 +77,7 @@ func (suite *ReportsStandardTestSuite) SetupTest() {
suite.db = testrig.NewTestDB(&suite.state)
suite.state.DB = suite.db
- suite.state.Actions = actions.New(suite.state.DB, &suite.state.Workers)
+ suite.state.AdminActions = admin.New(suite.state.DB, &suite.state.Workers)
suite.storage = testrig.NewInMemoryStorage()
suite.state.Storage = suite.storage
diff --git a/internal/api/client/search/search_test.go b/internal/api/client/search/search_test.go
index ce2f34fc7..fecb30d38 100644
--- a/internal/api/client/search/search_test.go
+++ b/internal/api/client/search/search_test.go
@@ -24,7 +24,7 @@ import (
"github.com/gin-gonic/gin"
"github.com/stretchr/testify/suite"
- "github.com/superseriousbusiness/gotosocial/internal/actions"
+ "github.com/superseriousbusiness/gotosocial/internal/admin"
"github.com/superseriousbusiness/gotosocial/internal/api/client/search"
"github.com/superseriousbusiness/gotosocial/internal/config"
"github.com/superseriousbusiness/gotosocial/internal/db"
@@ -81,7 +81,7 @@ func (suite *SearchStandardTestSuite) SetupTest() {
suite.db = testrig.NewTestDB(&suite.state)
suite.state.DB = suite.db
- suite.state.Actions = actions.New(suite.state.DB, &suite.state.Workers)
+ suite.state.AdminActions = admin.New(suite.state.DB, &suite.state.Workers)
suite.storage = testrig.NewInMemoryStorage()
suite.state.Storage = suite.storage
diff --git a/internal/api/client/statuses/status_test.go b/internal/api/client/statuses/status_test.go
index a56963c45..5a4473344 100644
--- a/internal/api/client/statuses/status_test.go
+++ b/internal/api/client/statuses/status_test.go
@@ -25,7 +25,7 @@ import (
"strings"
"github.com/stretchr/testify/suite"
- "github.com/superseriousbusiness/gotosocial/internal/actions"
+ "github.com/superseriousbusiness/gotosocial/internal/admin"
"github.com/superseriousbusiness/gotosocial/internal/api/client/statuses"
"github.com/superseriousbusiness/gotosocial/internal/db"
"github.com/superseriousbusiness/gotosocial/internal/email"
@@ -193,7 +193,7 @@ func (suite *StatusStandardTestSuite) SetupTest() {
suite.db = testrig.NewTestDB(&suite.state)
suite.state.DB = suite.db
- suite.state.Actions = actions.New(suite.state.DB, &suite.state.Workers)
+ suite.state.AdminActions = admin.New(suite.state.DB, &suite.state.Workers)
suite.storage = testrig.NewInMemoryStorage()
suite.state.Storage = suite.storage
diff --git a/internal/api/client/streaming/streaming_test.go b/internal/api/client/streaming/streaming_test.go
index 2080f2b69..03cd6f434 100644
--- a/internal/api/client/streaming/streaming_test.go
+++ b/internal/api/client/streaming/streaming_test.go
@@ -31,7 +31,7 @@ import (
"github.com/gin-gonic/gin"
"github.com/stretchr/testify/suite"
- "github.com/superseriousbusiness/gotosocial/internal/actions"
+ "github.com/superseriousbusiness/gotosocial/internal/admin"
"github.com/superseriousbusiness/gotosocial/internal/api/client/streaming"
"github.com/superseriousbusiness/gotosocial/internal/db"
"github.com/superseriousbusiness/gotosocial/internal/email"
@@ -93,7 +93,7 @@ func (suite *StreamingTestSuite) SetupTest() {
suite.db = testrig.NewTestDB(&suite.state)
suite.state.DB = suite.db
- suite.state.Actions = actions.New(suite.state.DB, &suite.state.Workers)
+ suite.state.AdminActions = admin.New(suite.state.DB, &suite.state.Workers)
suite.storage = testrig.NewInMemoryStorage()
suite.state.Storage = suite.storage
diff --git a/internal/api/client/tags/tags_test.go b/internal/api/client/tags/tags_test.go
index f86d71053..71a84435a 100644
--- a/internal/api/client/tags/tags_test.go
+++ b/internal/api/client/tags/tags_test.go
@@ -26,7 +26,7 @@ import (
"github.com/gin-gonic/gin"
"github.com/stretchr/testify/suite"
- "github.com/superseriousbusiness/gotosocial/internal/actions"
+ "github.com/superseriousbusiness/gotosocial/internal/admin"
"github.com/superseriousbusiness/gotosocial/internal/api/client/tags"
apimodel "github.com/superseriousbusiness/gotosocial/internal/api/model"
"github.com/superseriousbusiness/gotosocial/internal/config"
@@ -88,7 +88,7 @@ func (suite *TagsTestSuite) SetupTest() {
suite.db = testrig.NewTestDB(&suite.state)
suite.state.DB = suite.db
- suite.state.Actions = actions.New(suite.state.DB, &suite.state.Workers)
+ suite.state.AdminActions = admin.New(suite.state.DB, &suite.state.Workers)
suite.storage = testrig.NewInMemoryStorage()
suite.state.Storage = suite.storage
diff --git a/internal/api/client/user/user_test.go b/internal/api/client/user/user_test.go
index b9542f8be..320c743f8 100644
--- a/internal/api/client/user/user_test.go
+++ b/internal/api/client/user/user_test.go
@@ -24,7 +24,7 @@ import (
"github.com/gin-gonic/gin"
"github.com/stretchr/testify/suite"
- "github.com/superseriousbusiness/gotosocial/internal/actions"
+ "github.com/superseriousbusiness/gotosocial/internal/admin"
"github.com/superseriousbusiness/gotosocial/internal/api/client/user"
"github.com/superseriousbusiness/gotosocial/internal/db"
"github.com/superseriousbusiness/gotosocial/internal/federation"
@@ -73,7 +73,7 @@ func (suite *UserStandardTestSuite) SetupTest() {
suite.db = testrig.NewTestDB(&suite.state)
suite.state.DB = suite.db
- suite.state.Actions = actions.New(suite.state.DB, &suite.state.Workers)
+ suite.state.AdminActions = admin.New(suite.state.DB, &suite.state.Workers)
suite.storage = testrig.NewInMemoryStorage()
suite.state.Storage = suite.storage
diff --git a/internal/api/fileserver/fileserver_test.go b/internal/api/fileserver/fileserver_test.go
index 34912bae3..af6f125dc 100644
--- a/internal/api/fileserver/fileserver_test.go
+++ b/internal/api/fileserver/fileserver_test.go
@@ -19,7 +19,7 @@ package fileserver_test
import (
"github.com/stretchr/testify/suite"
- "github.com/superseriousbusiness/gotosocial/internal/actions"
+ "github.com/superseriousbusiness/gotosocial/internal/admin"
"github.com/superseriousbusiness/gotosocial/internal/api/fileserver"
"github.com/superseriousbusiness/gotosocial/internal/db"
"github.com/superseriousbusiness/gotosocial/internal/email"
@@ -99,7 +99,7 @@ func (suite *FileserverTestSuite) SetupTest() {
suite.db = testrig.NewTestDB(&suite.state)
suite.state.DB = suite.db
- suite.state.Actions = actions.New(suite.state.DB, &suite.state.Workers)
+ suite.state.AdminActions = admin.New(suite.state.DB, &suite.state.Workers)
testrig.StandardDBSetup(suite.db, nil)
testrig.StandardStorageSetup(suite.storage, "../../../testrig/media")
diff --git a/internal/api/wellknown/webfinger/webfinger_test.go b/internal/api/wellknown/webfinger/webfinger_test.go
index 68c671a13..76c1fb5bb 100644
--- a/internal/api/wellknown/webfinger/webfinger_test.go
+++ b/internal/api/wellknown/webfinger/webfinger_test.go
@@ -19,7 +19,7 @@ package webfinger_test
import (
"github.com/stretchr/testify/suite"
- "github.com/superseriousbusiness/gotosocial/internal/actions"
+ "github.com/superseriousbusiness/gotosocial/internal/admin"
"github.com/superseriousbusiness/gotosocial/internal/api/wellknown/webfinger"
"github.com/superseriousbusiness/gotosocial/internal/db"
"github.com/superseriousbusiness/gotosocial/internal/email"
@@ -80,7 +80,7 @@ func (suite *WebfingerStandardTestSuite) SetupTest() {
suite.db = testrig.NewTestDB(&suite.state)
suite.state.DB = suite.db
- suite.state.Actions = actions.New(suite.state.DB, &suite.state.Workers)
+ suite.state.AdminActions = admin.New(suite.state.DB, &suite.state.Workers)
suite.tc = typeutils.NewConverter(&suite.state)
testrig.StartTimelines(
diff --git a/internal/cleaner/media_test.go b/internal/cleaner/media_test.go
index 74da2827b..afa015783 100644
--- a/internal/cleaner/media_test.go
+++ b/internal/cleaner/media_test.go
@@ -26,7 +26,7 @@ import (
"time"
"github.com/stretchr/testify/suite"
- "github.com/superseriousbusiness/gotosocial/internal/actions"
+ "github.com/superseriousbusiness/gotosocial/internal/admin"
"github.com/superseriousbusiness/gotosocial/internal/cleaner"
"github.com/superseriousbusiness/gotosocial/internal/db"
"github.com/superseriousbusiness/gotosocial/internal/filter/visibility"
@@ -68,7 +68,7 @@ func (suite *MediaTestSuite) SetupTest() {
suite.db = testrig.NewTestDB(&suite.state)
suite.storage = testrig.NewInMemoryStorage()
suite.state.DB = suite.db
- suite.state.Actions = actions.New(suite.state.DB, &suite.state.Workers)
+ suite.state.AdminActions = admin.New(suite.state.DB, &suite.state.Workers)
suite.state.Storage = suite.storage
testrig.StandardStorageSetup(suite.storage, "../../testrig/media")
diff --git a/internal/federation/dereferencing/dereferencer_test.go b/internal/federation/dereferencing/dereferencer_test.go
index 1690a68e2..9878a1b50 100644
--- a/internal/federation/dereferencing/dereferencer_test.go
+++ b/internal/federation/dereferencing/dereferencer_test.go
@@ -20,7 +20,7 @@ package dereferencing_test
import (
"github.com/stretchr/testify/suite"
"github.com/superseriousbusiness/activity/streams/vocab"
- "github.com/superseriousbusiness/gotosocial/internal/actions"
+ "github.com/superseriousbusiness/gotosocial/internal/admin"
"github.com/superseriousbusiness/gotosocial/internal/db"
"github.com/superseriousbusiness/gotosocial/internal/federation/dereferencing"
"github.com/superseriousbusiness/gotosocial/internal/filter/interaction"
@@ -78,7 +78,7 @@ func (suite *DereferencerStandardTestSuite) SetupTest() {
suite.client = testrig.NewMockHTTPClient(nil, "../../../testrig/media")
suite.storage = testrig.NewInMemoryStorage()
suite.state.DB = suite.db
- suite.state.Actions = actions.New(suite.state.DB, &suite.state.Workers)
+ suite.state.AdminActions = admin.New(suite.state.DB, &suite.state.Workers)
suite.state.Storage = suite.storage
visFilter := visibility.NewFilter(&suite.state)
diff --git a/internal/federation/federatingdb/federatingdb_test.go b/internal/federation/federatingdb/federatingdb_test.go
index f07d828c7..2f07914ae 100644
--- a/internal/federation/federatingdb/federatingdb_test.go
+++ b/internal/federation/federatingdb/federatingdb_test.go
@@ -22,7 +22,7 @@ import (
"time"
"github.com/stretchr/testify/suite"
- "github.com/superseriousbusiness/gotosocial/internal/actions"
+ "github.com/superseriousbusiness/gotosocial/internal/admin"
"github.com/superseriousbusiness/gotosocial/internal/db"
"github.com/superseriousbusiness/gotosocial/internal/federation/federatingdb"
"github.com/superseriousbusiness/gotosocial/internal/filter/visibility"
@@ -92,7 +92,7 @@ func (suite *FederatingDBTestSuite) SetupTest() {
testrig.StandardDBSetup(suite.db, suite.testAccounts)
suite.state.DB = suite.db
- suite.state.Actions = actions.New(suite.state.DB, &suite.state.Workers)
+ suite.state.AdminActions = admin.New(suite.state.DB, &suite.state.Workers)
}
func (suite *FederatingDBTestSuite) TearDownTest() {
diff --git a/internal/media/media_test.go b/internal/media/media_test.go
index daefc910d..f46f837da 100644
--- a/internal/media/media_test.go
+++ b/internal/media/media_test.go
@@ -19,7 +19,7 @@ package media_test
import (
"github.com/stretchr/testify/suite"
- "github.com/superseriousbusiness/gotosocial/internal/actions"
+ "github.com/superseriousbusiness/gotosocial/internal/admin"
"github.com/superseriousbusiness/gotosocial/internal/db"
"github.com/superseriousbusiness/gotosocial/internal/filter/visibility"
gtsmodel "github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
@@ -54,7 +54,7 @@ func (suite *MediaStandardTestSuite) SetupTest() {
suite.db = testrig.NewTestDB(&suite.state)
suite.storage = testrig.NewInMemoryStorage()
suite.state.DB = suite.db
- suite.state.Actions = actions.New(suite.state.DB, &suite.state.Workers)
+ suite.state.AdminActions = admin.New(suite.state.DB, &suite.state.Workers)
suite.state.Storage = suite.storage
testrig.StandardStorageSetup(suite.storage, "../../testrig/media")
diff --git a/internal/oauth/clientstore_test.go b/internal/oauth/clientstore_test.go
index 5b01f1548..0ced34de6 100644
--- a/internal/oauth/clientstore_test.go
+++ b/internal/oauth/clientstore_test.go
@@ -22,7 +22,7 @@ import (
"testing"
"github.com/stretchr/testify/suite"
- "github.com/superseriousbusiness/gotosocial/internal/actions"
+ "github.com/superseriousbusiness/gotosocial/internal/admin"
"github.com/superseriousbusiness/gotosocial/internal/db"
"github.com/superseriousbusiness/gotosocial/internal/oauth"
"github.com/superseriousbusiness/gotosocial/internal/state"
@@ -55,7 +55,7 @@ func (suite *PgClientStoreTestSuite) SetupTest() {
testrig.InitTestConfig()
suite.db = testrig.NewTestDB(&suite.state)
suite.state.DB = suite.db
- suite.state.Actions = actions.New(suite.state.DB, &suite.state.Workers)
+ suite.state.AdminActions = admin.New(suite.state.DB, &suite.state.Workers)
testrig.StandardDBSetup(suite.db, nil)
}
diff --git a/internal/processing/account/account_test.go b/internal/processing/account/account_test.go
index 0ff66f76d..7bd9658dc 100644
--- a/internal/processing/account/account_test.go
+++ b/internal/processing/account/account_test.go
@@ -22,7 +22,7 @@ import (
"time"
"github.com/stretchr/testify/suite"
- "github.com/superseriousbusiness/gotosocial/internal/actions"
+ "github.com/superseriousbusiness/gotosocial/internal/admin"
"github.com/superseriousbusiness/gotosocial/internal/db"
"github.com/superseriousbusiness/gotosocial/internal/email"
"github.com/superseriousbusiness/gotosocial/internal/federation"
@@ -94,7 +94,7 @@ func (suite *AccountStandardTestSuite) SetupTest() {
suite.db = testrig.NewTestDB(&suite.state)
suite.state.DB = suite.db
- suite.state.Actions = actions.New(suite.state.DB, &suite.state.Workers)
+ suite.state.AdminActions = admin.New(suite.state.DB, &suite.state.Workers)
suite.tc = typeutils.NewConverter(&suite.state)
testrig.StartTimelines(
diff --git a/internal/processing/admin/account_test.go b/internal/processing/admin/account_test.go
index 7665cf4e3..baa6eb646 100644
--- a/internal/processing/admin/account_test.go
+++ b/internal/processing/admin/account_test.go
@@ -53,7 +53,7 @@ func (suite *AccountTestSuite) TestAccountActionSuspend() {
// Wait for action to finish.
if !testrig.WaitFor(func() bool {
- return suite.state.Actions.TotalRunning() == 0
+ return suite.state.AdminActions.TotalRunning() == 0
}) {
suite.FailNow("timed out waiting for admin action(s) to finish")
}
diff --git a/internal/processing/admin/accountaction.go b/internal/processing/admin/accountaction.go
index 3072c3d51..959f2cfcd 100644
--- a/internal/processing/admin/accountaction.go
+++ b/internal/processing/admin/accountaction.go
@@ -68,7 +68,7 @@ func (p *Processor) accountActionSuspend(
) (string, gtserror.WithCode) {
actionID := id.NewULID()
- errWithCode := p.state.Actions.Run(
+ errWithCode := p.state.AdminActions.Run(
ctx,
>smodel.AdminAction{
ID: actionID,
diff --git a/internal/processing/admin/admin_test.go b/internal/processing/admin/admin_test.go
index cdb6af2b0..f0839f2f6 100644
--- a/internal/processing/admin/admin_test.go
+++ b/internal/processing/admin/admin_test.go
@@ -19,7 +19,7 @@ package admin_test
import (
"github.com/stretchr/testify/suite"
- "github.com/superseriousbusiness/gotosocial/internal/actions"
+ adminactions "github.com/superseriousbusiness/gotosocial/internal/admin"
"github.com/superseriousbusiness/gotosocial/internal/cleaner"
"github.com/superseriousbusiness/gotosocial/internal/db"
"github.com/superseriousbusiness/gotosocial/internal/email"
@@ -91,7 +91,7 @@ func (suite *AdminStandardTestSuite) SetupTest() {
suite.db = testrig.NewTestDB(&suite.state)
suite.state.DB = suite.db
- suite.state.Actions = actions.New(suite.state.DB, &suite.state.Workers)
+ suite.state.AdminActions = adminactions.New(suite.state.DB, &suite.state.Workers)
suite.tc = typeutils.NewConverter(&suite.state)
testrig.StartTimelines(
diff --git a/internal/processing/admin/domainallow.go b/internal/processing/admin/domainallow.go
index e21538429..13f0307f2 100644
--- a/internal/processing/admin/domainallow.go
+++ b/internal/processing/admin/domainallow.go
@@ -76,10 +76,10 @@ func (p *Processor) createDomainAllow(
AccountID: adminAcct.ID,
}
- if errWithCode := p.state.Actions.Run(
+ if errWithCode := p.state.AdminActions.Run(
ctx,
action,
- p.state.Actions.DomainAllowF(action.ID, domainAllow),
+ p.state.AdminActions.DomainAllowF(action.ID, domainAllow),
); errWithCode != nil {
return nil, action.ID, errWithCode
}
@@ -132,10 +132,10 @@ func (p *Processor) deleteDomainAllow(
AccountID: adminAcct.ID,
}
- if errWithCode := p.state.Actions.Run(
+ if errWithCode := p.state.AdminActions.Run(
ctx,
action,
- p.state.Actions.DomainUnallowF(action.ID, domainAllow),
+ p.state.AdminActions.DomainUnallowF(action.ID, domainAllow),
); errWithCode != nil {
return nil, action.ID, errWithCode
}
diff --git a/internal/processing/admin/domainblock.go b/internal/processing/admin/domainblock.go
index 940c0dfce..f8c1a6708 100644
--- a/internal/processing/admin/domainblock.go
+++ b/internal/processing/admin/domainblock.go
@@ -77,10 +77,10 @@ func (p *Processor) createDomainBlock(
Text: domainBlock.PrivateComment,
}
- if errWithCode := p.state.Actions.Run(
+ if errWithCode := p.state.AdminActions.Run(
ctx,
action,
- p.state.Actions.DomainBlockF(action.ID, domainBlock),
+ p.state.AdminActions.DomainBlockF(action.ID, domainBlock),
); errWithCode != nil {
return nil, action.ID, errWithCode
}
@@ -133,10 +133,10 @@ func (p *Processor) deleteDomainBlock(
AccountID: adminAcct.ID,
}
- if errWithCode := p.state.Actions.Run(
+ if errWithCode := p.state.AdminActions.Run(
ctx,
action,
- p.state.Actions.DomainUnblockF(action.ID, domainBlock),
+ p.state.AdminActions.DomainUnblockF(action.ID, domainBlock),
); errWithCode != nil {
return nil, action.ID, errWithCode
}
diff --git a/internal/processing/admin/domainkeysexpire.go b/internal/processing/admin/domainkeysexpire.go
index 76d3ad90f..0613f502d 100644
--- a/internal/processing/admin/domainkeysexpire.go
+++ b/internal/processing/admin/domainkeysexpire.go
@@ -48,10 +48,10 @@ func (p *Processor) DomainKeysExpire(
AccountID: adminAcct.ID,
}
- if errWithCode := p.state.Actions.Run(
+ if errWithCode := p.state.AdminActions.Run(
ctx,
action,
- p.state.Actions.DomainKeysExpireF(domain),
+ p.state.AdminActions.DomainKeysExpireF(domain),
); errWithCode != nil {
return action.ID, errWithCode
}
diff --git a/internal/processing/admin/domainpermission_test.go b/internal/processing/admin/domainpermission_test.go
index 577ec69b4..c8f3560c3 100644
--- a/internal/processing/admin/domainpermission_test.go
+++ b/internal/processing/admin/domainpermission_test.go
@@ -186,7 +186,7 @@ func (suite *DomainBlockTestSuite) awaitAction(actionID string) {
ctx := context.Background()
if !testrig.WaitFor(func() bool {
- return suite.state.Actions.TotalRunning() == 0
+ return suite.state.AdminActions.TotalRunning() == 0
}) {
suite.FailNow("timed out waiting for admin action(s) to finish")
}
diff --git a/internal/processing/conversations/conversations_test.go b/internal/processing/conversations/conversations_test.go
index 1d37e24be..831ba1a43 100644
--- a/internal/processing/conversations/conversations_test.go
+++ b/internal/processing/conversations/conversations_test.go
@@ -23,7 +23,7 @@ import (
"time"
"github.com/stretchr/testify/suite"
- "github.com/superseriousbusiness/gotosocial/internal/actions"
+ "github.com/superseriousbusiness/gotosocial/internal/admin"
"github.com/superseriousbusiness/gotosocial/internal/db"
dbtest "github.com/superseriousbusiness/gotosocial/internal/db/test"
"github.com/superseriousbusiness/gotosocial/internal/email"
@@ -104,7 +104,7 @@ func (suite *ConversationsTestSuite) SetupTest() {
suite.db = testrig.NewTestDB(&suite.state)
suite.state.DB = suite.db
- suite.state.Actions = actions.New(suite.state.DB, &suite.state.Workers)
+ suite.state.AdminActions = admin.New(suite.state.DB, &suite.state.Workers)
suite.tc = typeutils.NewConverter(&suite.state)
suite.filter = visibility.NewFilter(&suite.state)
diff --git a/internal/processing/media/media_test.go b/internal/processing/media/media_test.go
index 28e8222a7..2930733c4 100644
--- a/internal/processing/media/media_test.go
+++ b/internal/processing/media/media_test.go
@@ -19,7 +19,7 @@ package media_test
import (
"github.com/stretchr/testify/suite"
- "github.com/superseriousbusiness/gotosocial/internal/actions"
+ "github.com/superseriousbusiness/gotosocial/internal/admin"
"github.com/superseriousbusiness/gotosocial/internal/db"
"github.com/superseriousbusiness/gotosocial/internal/filter/visibility"
"github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
@@ -76,7 +76,7 @@ func (suite *MediaStandardTestSuite) SetupTest() {
suite.db = testrig.NewTestDB(&suite.state)
suite.state.DB = suite.db
- suite.state.Actions = actions.New(suite.state.DB, &suite.state.Workers)
+ suite.state.AdminActions = admin.New(suite.state.DB, &suite.state.Workers)
suite.tc = typeutils.NewConverter(&suite.state)
suite.storage = testrig.NewInMemoryStorage()
suite.state.Storage = suite.storage
diff --git a/internal/processing/processor_test.go b/internal/processing/processor_test.go
index dc4507ba0..f152f3fad 100644
--- a/internal/processing/processor_test.go
+++ b/internal/processing/processor_test.go
@@ -21,7 +21,7 @@ import (
"context"
"github.com/stretchr/testify/suite"
- "github.com/superseriousbusiness/gotosocial/internal/actions"
+ "github.com/superseriousbusiness/gotosocial/internal/admin"
"github.com/superseriousbusiness/gotosocial/internal/cleaner"
"github.com/superseriousbusiness/gotosocial/internal/db"
"github.com/superseriousbusiness/gotosocial/internal/email"
@@ -104,7 +104,7 @@ func (suite *ProcessingStandardTestSuite) SetupTest() {
suite.db = testrig.NewTestDB(&suite.state)
suite.state.DB = suite.db
- suite.state.Actions = actions.New(suite.state.DB, &suite.state.Workers)
+ suite.state.AdminActions = admin.New(suite.state.DB, &suite.state.Workers)
suite.testActivities = testrig.NewTestActivities(suite.testAccounts)
suite.storage = testrig.NewInMemoryStorage()
suite.state.Storage = suite.storage
diff --git a/internal/processing/status/status_test.go b/internal/processing/status/status_test.go
index 604df095f..74aef7188 100644
--- a/internal/processing/status/status_test.go
+++ b/internal/processing/status/status_test.go
@@ -19,7 +19,7 @@ package status_test
import (
"github.com/stretchr/testify/suite"
- "github.com/superseriousbusiness/gotosocial/internal/actions"
+ "github.com/superseriousbusiness/gotosocial/internal/admin"
"github.com/superseriousbusiness/gotosocial/internal/db"
"github.com/superseriousbusiness/gotosocial/internal/federation"
"github.com/superseriousbusiness/gotosocial/internal/filter/interaction"
@@ -85,7 +85,7 @@ func (suite *StatusStandardTestSuite) SetupTest() {
suite.db = testrig.NewTestDB(&suite.state)
suite.typeConverter = typeutils.NewConverter(&suite.state)
suite.state.DB = suite.db
- suite.state.Actions = actions.New(suite.state.DB, &suite.state.Workers)
+ suite.state.AdminActions = admin.New(suite.state.DB, &suite.state.Workers)
suite.tc = testrig.NewTestTransportController(&suite.state, testrig.NewMockHTTPClient(nil, "../../../testrig/media"))
suite.storage = testrig.NewInMemoryStorage()
diff --git a/internal/processing/stream/stream_test.go b/internal/processing/stream/stream_test.go
index 98f44e999..96ea65b0f 100644
--- a/internal/processing/stream/stream_test.go
+++ b/internal/processing/stream/stream_test.go
@@ -19,7 +19,7 @@ package stream_test
import (
"github.com/stretchr/testify/suite"
- "github.com/superseriousbusiness/gotosocial/internal/actions"
+ "github.com/superseriousbusiness/gotosocial/internal/admin"
"github.com/superseriousbusiness/gotosocial/internal/db"
"github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
"github.com/superseriousbusiness/gotosocial/internal/oauth"
@@ -51,7 +51,7 @@ func (suite *StreamTestSuite) SetupTest() {
suite.testTokens = testrig.NewTestTokens()
suite.db = testrig.NewTestDB(&suite.state)
suite.state.DB = suite.db
- suite.state.Actions = actions.New(suite.state.DB, &suite.state.Workers)
+ suite.state.AdminActions = admin.New(suite.state.DB, &suite.state.Workers)
suite.oauthServer = testrig.NewTestOauthServer(suite.db)
suite.streamProcessor = stream.New(&suite.state, suite.oauthServer)
diff --git a/internal/processing/timeline/timeline_test.go b/internal/processing/timeline/timeline_test.go
index a41572ab0..8ff6be5d1 100644
--- a/internal/processing/timeline/timeline_test.go
+++ b/internal/processing/timeline/timeline_test.go
@@ -19,7 +19,7 @@ package timeline_test
import (
"github.com/stretchr/testify/suite"
- "github.com/superseriousbusiness/gotosocial/internal/actions"
+ "github.com/superseriousbusiness/gotosocial/internal/admin"
"github.com/superseriousbusiness/gotosocial/internal/db"
"github.com/superseriousbusiness/gotosocial/internal/filter/visibility"
"github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
@@ -56,7 +56,7 @@ func (suite *TimelineStandardTestSuite) SetupTest() {
suite.db = testrig.NewTestDB(&suite.state)
suite.state.DB = suite.db
- suite.state.Actions = actions.New(suite.state.DB, &suite.state.Workers)
+ suite.state.AdminActions = admin.New(suite.state.DB, &suite.state.Workers)
suite.timeline = timeline.New(
&suite.state,
diff --git a/internal/processing/user/user_test.go b/internal/processing/user/user_test.go
index 75ef985fb..2a9e0a89f 100644
--- a/internal/processing/user/user_test.go
+++ b/internal/processing/user/user_test.go
@@ -19,7 +19,7 @@ package user_test
import (
"github.com/stretchr/testify/suite"
- "github.com/superseriousbusiness/gotosocial/internal/actions"
+ "github.com/superseriousbusiness/gotosocial/internal/admin"
"github.com/superseriousbusiness/gotosocial/internal/db"
"github.com/superseriousbusiness/gotosocial/internal/email"
"github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
@@ -50,7 +50,7 @@ func (suite *UserStandardTestSuite) SetupTest() {
suite.db = testrig.NewTestDB(&suite.state)
suite.state.DB = suite.db
- suite.state.Actions = actions.New(suite.state.DB, &suite.state.Workers)
+ suite.state.AdminActions = admin.New(suite.state.DB, &suite.state.Workers)
suite.sentEmails = make(map[string]string)
suite.emailSender = testrig.NewEmailSender("../../../web/template/", suite.sentEmails)
diff --git a/internal/state/state.go b/internal/state/state.go
index 8e962f10e..8aefa658a 100644
--- a/internal/state/state.go
+++ b/internal/state/state.go
@@ -19,7 +19,7 @@ package state
import (
"codeberg.org/gruf/go-mutexes"
- "github.com/superseriousbusiness/gotosocial/internal/actions"
+ "github.com/superseriousbusiness/gotosocial/internal/admin"
"github.com/superseriousbusiness/gotosocial/internal/cache"
"github.com/superseriousbusiness/gotosocial/internal/db"
"github.com/superseriousbusiness/gotosocial/internal/storage"
@@ -68,7 +68,7 @@ type State struct {
// Struct to manage running admin
// actions (and locks thereupon).
- Actions *actions.Actions
+ AdminActions *admin.Actions
// prevent pass-by-value.
_ nocopy
diff --git a/internal/subscriptions/domainperms.go b/internal/subscriptions/domainperms.go
index f494d5099..c4a0a025d 100644
--- a/internal/subscriptions/domainperms.go
+++ b/internal/subscriptions/domainperms.go
@@ -32,7 +32,7 @@ import (
"codeberg.org/gruf/go-kv"
"github.com/miekg/dns"
- "github.com/superseriousbusiness/gotosocial/internal/actions"
+ "github.com/superseriousbusiness/gotosocial/internal/admin"
apimodel "github.com/superseriousbusiness/gotosocial/internal/api/model"
"github.com/superseriousbusiness/gotosocial/internal/config"
"github.com/superseriousbusiness/gotosocial/internal/db"
@@ -434,7 +434,7 @@ func (s *Subscriptions) processDomainPermission(
var (
insertF func() error
action *gtsmodel.AdminAction
- actionF actions.AdminActionF
+ actionF admin.AdminActionF
)
if permSub.PermissionType == gtsmodel.DomainPermissionBlock {
@@ -458,7 +458,7 @@ func (s *Subscriptions) processDomainPermission(
Type: gtsmodel.AdminActionSuspend,
AccountID: permSub.CreatedByAccountID,
}
- actionF = s.state.Actions.DomainBlockF(action.ID, domainBlock)
+ actionF = s.state.AdminActions.DomainBlockF(action.ID, domainBlock)
} else {
// Prepare to insert + process an allow.
@@ -481,7 +481,7 @@ func (s *Subscriptions) processDomainPermission(
Type: gtsmodel.AdminActionUnsuspend,
AccountID: permSub.CreatedByAccountID,
}
- actionF = s.state.Actions.DomainAllowF(action.ID, domainAllow)
+ actionF = s.state.AdminActions.DomainAllowF(action.ID, domainAllow)
}
// Insert the new perm in the db.
@@ -493,7 +493,7 @@ func (s *Subscriptions) processDomainPermission(
// Run admin action to process
// side effects of permission.
- err = s.state.Actions.Run(ctx, action, actionF)
+ err = s.state.AdminActions.Run(ctx, action, actionF)
case existingPerm.GetSubscriptionID() != "" || *permSub.AdoptOrphans:
// Perm exists but we should adopt/take
diff --git a/internal/transport/transport_test.go b/internal/transport/transport_test.go
index b43425eaf..c51c0755f 100644
--- a/internal/transport/transport_test.go
+++ b/internal/transport/transport_test.go
@@ -21,7 +21,7 @@ import (
"context"
"github.com/stretchr/testify/suite"
- "github.com/superseriousbusiness/gotosocial/internal/actions"
+ "github.com/superseriousbusiness/gotosocial/internal/admin"
"github.com/superseriousbusiness/gotosocial/internal/db"
"github.com/superseriousbusiness/gotosocial/internal/email"
"github.com/superseriousbusiness/gotosocial/internal/federation"
@@ -75,7 +75,7 @@ func (suite *TransportTestSuite) SetupTest() {
suite.db = testrig.NewTestDB(&suite.state)
suite.state.DB = suite.db
- suite.state.Actions = actions.New(suite.state.DB, &suite.state.Workers)
+ suite.state.AdminActions = admin.New(suite.state.DB, &suite.state.Workers)
suite.storage = testrig.NewInMemoryStorage()
suite.state.Storage = suite.storage
diff --git a/internal/typeutils/converter_test.go b/internal/typeutils/converter_test.go
index 904b96f40..a5fe5201b 100644
--- a/internal/typeutils/converter_test.go
+++ b/internal/typeutils/converter_test.go
@@ -20,7 +20,7 @@ package typeutils_test
import (
"github.com/stretchr/testify/suite"
"github.com/superseriousbusiness/activity/streams/vocab"
- "github.com/superseriousbusiness/gotosocial/internal/actions"
+ "github.com/superseriousbusiness/gotosocial/internal/admin"
"github.com/superseriousbusiness/gotosocial/internal/db"
"github.com/superseriousbusiness/gotosocial/internal/filter/visibility"
"github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
@@ -500,7 +500,7 @@ func (suite *TypeUtilsTestSuite) SetupTest() {
suite.db = testrig.NewTestDB(&suite.state)
suite.state.DB = suite.db
- suite.state.Actions = actions.New(suite.state.DB, &suite.state.Workers)
+ suite.state.AdminActions = admin.New(suite.state.DB, &suite.state.Workers)
storage := testrig.NewInMemoryStorage()
suite.state.Storage = storage
diff --git a/testrig/teststructs.go b/testrig/teststructs.go
index 9677ad219..58986bffa 100644
--- a/testrig/teststructs.go
+++ b/testrig/teststructs.go
@@ -18,7 +18,7 @@
package testrig
import (
- "github.com/superseriousbusiness/gotosocial/internal/actions"
+ "github.com/superseriousbusiness/gotosocial/internal/admin"
"github.com/superseriousbusiness/gotosocial/internal/cleaner"
"github.com/superseriousbusiness/gotosocial/internal/email"
"github.com/superseriousbusiness/gotosocial/internal/filter/interaction"
@@ -60,7 +60,7 @@ func SetupTestStructs(
db := NewTestDB(&state)
state.DB = db
- state.Actions = actions.New(db, &state.Workers)
+ state.AdminActions = admin.New(db, &state.Workers)
storage := NewInMemoryStorage()
state.Storage = storage