aboutsummaryrefslogtreecommitdiff
path: root/activitypub/activity.go
diff options
context:
space:
mode:
authorFChannel <>2022-06-14 12:57:56 -0700
committerFChannel <>2022-06-19 12:53:29 -0700
commit27d0796d7f775034f391ba8aaca99f2a81018842 (patch)
treea1b9f6efe413675d06423b0139f30c969adb6864 /activitypub/activity.go
parentcb9a6cf7fcf379202f2ccfc4776daf4dd1d35b9d (diff)
send to correct actors incase not following directly
Diffstat (limited to 'activitypub/activity.go')
-rw-r--r--activitypub/activity.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/activitypub/activity.go b/activitypub/activity.go
index 5d89272..71f2d5c 100644
--- a/activitypub/activity.go
+++ b/activitypub/activity.go
@@ -44,8 +44,20 @@ func (activity Activity) AddFollowersTo() (Activity, error) {
return activity, util.MakeError(err, "AddFollowersTo")
}
+ // get followers of activity actor
for _, k := range aFollowers.Items {
activity.To = append(activity.To, k.Id)
+ reqActivity := Activity{Id: k.Id + "/followers"}
+
+ bFollowers, err := reqActivity.GetCollection()
+ if err != nil {
+ return activity, util.MakeError(err, "AddFollowersTo")
+ }
+
+ // get followers of activity actor followers
+ for _, j := range bFollowers.Items {
+ activity.To = append(activity.To, j.Id)
+ }
}
}