summaryrefslogtreecommitdiff
path: root/internal/processing/account/removefollow.go
diff options
context:
space:
mode:
authorLibravatar kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>2021-09-03 10:27:40 +0100
committerLibravatar GitHub <noreply@github.com>2021-09-03 10:27:40 +0100
commit25edd57eaf3eecf0b449a4dabb5b5fc5d6ae7687 (patch)
treeb6cffb65d46a07f59d5393a257973910d4116227 /internal/processing/account/removefollow.go
parentsession name fix (#185) (diff)
parentreview changes (diff)
downloadgotosocial-25edd57eaf3eecf0b449a4dabb5b5fc5d6ae7687.tar.xz
Merge pull request #186 from superseriousbusiness/struct_validation
Struct validation
Diffstat (limited to 'internal/processing/account/removefollow.go')
-rw-r--r--internal/processing/account/removefollow.go14
1 files changed, 8 insertions, 6 deletions
diff --git a/internal/processing/account/removefollow.go b/internal/processing/account/removefollow.go
index 6186c550f..9791f2e54 100644
--- a/internal/processing/account/removefollow.go
+++ b/internal/processing/account/removefollow.go
@@ -22,10 +22,12 @@ 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/messages"
)
func (p *processor) FollowRemove(ctx context.Context, requestingAccount *gtsmodel.Account, targetAccountID string) (*apimodel.Relationship, gtserror.WithCode) {
@@ -78,9 +80,9 @@ func (p *processor) FollowRemove(ctx context.Context, requestingAccount *gtsmode
// 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,
@@ -93,9 +95,9 @@ func (p *processor) FollowRemove(ctx context.Context, requestingAccount *gtsmode
// 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,