summaryrefslogtreecommitdiff
path: root/internal/processing
diff options
context:
space:
mode:
Diffstat (limited to 'internal/processing')
-rw-r--r--internal/processing/account/follow.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/internal/processing/account/follow.go b/internal/processing/account/follow.go
index 2c9b1be4e..26d552bbb 100644
--- a/internal/processing/account/follow.go
+++ b/internal/processing/account/follow.go
@@ -258,13 +258,9 @@ func (p *Processor) unfollow(ctx context.Context, requestingAccount *gtsmodel.Ac
msgs = append(msgs, &messages.FromClientAPI{
APObjectType: ap.ActivityFollow,
APActivityType: ap.ActivityUndo,
- GTSModel: &gtsmodel.Follow{
- AccountID: requestingAccount.ID,
- TargetAccountID: targetAccount.ID,
- URI: follow.URI,
- },
- Origin: requestingAccount,
- Target: targetAccount,
+ GTSModel: follow,
+ Origin: requestingAccount,
+ Target: targetAccount,
})
}
@@ -294,9 +290,13 @@ func (p *Processor) unfollow(ctx context.Context, requestingAccount *gtsmodel.Ac
msgs = append(msgs, &messages.FromClientAPI{
APObjectType: ap.ActivityFollow,
APActivityType: ap.ActivityUndo,
+ // Dummy out a follow to undo,
+ // based on the follow request.
GTSModel: &gtsmodel.Follow{
AccountID: requestingAccount.ID,
+ Account: requestingAccount,
TargetAccountID: targetAccount.ID,
+ TargetAccount: targetAccount,
URI: followReq.URI,
},
Origin: requestingAccount,