summaryrefslogtreecommitdiff
path: root/internal/processing/account/createblock.go
diff options
context:
space:
mode:
authorLibravatar tsmethurst <tobi.smethurst@protonmail.com>2021-08-31 15:59:12 +0200
committerLibravatar tsmethurst <tobi.smethurst@protonmail.com>2021-09-01 11:11:26 +0200
commit2786b5f88742c3f32b8ed497df3737cb4f57caec (patch)
treec088b71b228a52fb3bbf37628caea82ff7a42067 /internal/processing/account/createblock.go
parentgo fmt (diff)
downloadgotosocial-2786b5f88742c3f32b8ed497df3737cb4f57caec.tar.xz
change muchos things
Diffstat (limited to 'internal/processing/account/createblock.go')
-rw-r--r--internal/processing/account/createblock.go20
1 files changed, 11 insertions, 9 deletions
diff --git a/internal/processing/account/createblock.go b/internal/processing/account/createblock.go
index 06f82b37d..347f19bee 100644
--- a/internal/processing/account/createblock.go
+++ b/internal/processing/account/createblock.go
@@ -22,11 +22,13 @@ import (
"context"
"fmt"
+ "github.com/superseriousbusiness/gotosocial/internal/ap"
apimodel "github.com/superseriousbusiness/gotosocial/internal/api/model"
"github.com/superseriousbusiness/gotosocial/internal/db"
"github.com/superseriousbusiness/gotosocial/internal/gtserror"
"github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
"github.com/superseriousbusiness/gotosocial/internal/id"
+ "github.com/superseriousbusiness/gotosocial/internal/messages"
"github.com/superseriousbusiness/gotosocial/internal/util"
)
@@ -111,9 +113,9 @@ func (p *processor) BlockCreate(ctx context.Context, requestingAccount *gtsmodel
// follow request status changed so send the UNDO activity to the channel for async processing
if frChanged {
- p.fromClientAPI <- gtsmodel.FromClientAPI{
- APObjectType: gtsmodel.ActivityStreamsFollow,
- APActivityType: gtsmodel.ActivityStreamsUndo,
+ p.fromClientAPI <- messages.FromClientAPI{
+ APObjectType: ap.ActivityFollow,
+ APActivityType: ap.ActivityUndo,
GTSModel: &gtsmodel.Follow{
AccountID: requestingAccount.ID,
TargetAccountID: targetAccountID,
@@ -126,9 +128,9 @@ func (p *processor) BlockCreate(ctx context.Context, requestingAccount *gtsmodel
// follow status changed so send the UNDO activity to the channel for async processing
if fChanged {
- p.fromClientAPI <- gtsmodel.FromClientAPI{
- APObjectType: gtsmodel.ActivityStreamsFollow,
- APActivityType: gtsmodel.ActivityStreamsUndo,
+ p.fromClientAPI <- messages.FromClientAPI{
+ APObjectType: ap.ActivityFollow,
+ APActivityType: ap.ActivityUndo,
GTSModel: &gtsmodel.Follow{
AccountID: requestingAccount.ID,
TargetAccountID: targetAccountID,
@@ -140,9 +142,9 @@ func (p *processor) BlockCreate(ctx context.Context, requestingAccount *gtsmodel
}
// handle the rest of the block process asynchronously
- p.fromClientAPI <- gtsmodel.FromClientAPI{
- APObjectType: gtsmodel.ActivityStreamsBlock,
- APActivityType: gtsmodel.ActivityStreamsCreate,
+ p.fromClientAPI <- messages.FromClientAPI{
+ APObjectType: ap.ActivityBlock,
+ APActivityType: ap.ActivityCreate,
GTSModel: block,
OriginAccount: requestingAccount,
TargetAccount: targetAccount,