From 3fedff3a5aa7602069290c216ced5f63acd21357 Mon Sep 17 00:00:00 2001 From: tobi Date: Mon, 12 May 2025 16:22:45 +0000 Subject: [chore] Tidy up previous interaction policy migrations (#4171) This pull request tidies up some previous migrations by making sure there's a proper snapshot in the migrations folder of what interaction policies looked like at the time the migration was written, rather than using the moving target `internal/gtsmodel`. Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4171 Co-authored-by: tobi Co-committed-by: tobi --- .../migrations/20240809134448_interaction_requests_client_api.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'internal/db/bundb/migrations/20240809134448_interaction_requests_client_api.go') diff --git a/internal/db/bundb/migrations/20240809134448_interaction_requests_client_api.go b/internal/db/bundb/migrations/20240809134448_interaction_requests_client_api.go index 391322f3e..79d0b01bf 100644 --- a/internal/db/bundb/migrations/20240809134448_interaction_requests_client_api.go +++ b/internal/db/bundb/migrations/20240809134448_interaction_requests_client_api.go @@ -20,8 +20,7 @@ package migrations import ( "context" - "code.superseriousbusiness.org/gotosocial/internal/gtsmodel" - "code.superseriousbusiness.org/gotosocial/internal/typeutils" + gtsmodel "code.superseriousbusiness.org/gotosocial/internal/db/bundb/migrations/20240809134448_interaction_requests_client_api" "github.com/uptrace/bun" ) @@ -93,7 +92,7 @@ func init() { // For each currently pending status, check whether it's a reply or // a boost, and insert a corresponding interaction request into the db. for _, pendingStatus := range pendingStatuses { - req := typeutils.StatusToInteractionRequest(pendingStatus) + req := gtsmodel.StatusToInteractionReq(pendingStatus) if _, err := tx. NewInsert(). Model(req). @@ -121,7 +120,7 @@ func init() { } for _, pendingFave := range pendingFaves { - req := typeutils.StatusFaveToInteractionRequest(pendingFave) + req := gtsmodel.StatusFaveToInteractionRequest(pendingFave) if _, err := tx. NewInsert(). -- cgit v1.2.3