aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go16
1 files changed, 14 insertions, 2 deletions
diff --git a/main.go b/main.go
index 68daf39..2d2831b 100644
--- a/main.go
+++ b/main.go
@@ -484,8 +484,14 @@ func main() {
if following.MatchString(follow) {
followingActor := FingerActor(follow)
col := GetActorCollection(followingActor.Following)
+
+ var nObj ObjectBase
+ nObj.Id = followingActor.Id
+
+ col.Items = append(col.Items, nObj)
+
for _, e := range col.Items {
- if !IsAlreadyFollowing(db, actorId, e.Id) && e.Id != Domain {
+ if !IsAlreadyFollowing(db, actorId, e.Id) && e.Id != Domain && e.Id != actorId {
followActivity := MakeFollowActivity(db, actorId, e.Id)
if FingerActor(e.Id).Id != "" {
@@ -498,8 +504,14 @@ func main() {
} else if followers.MatchString(follow){
followersActor := FingerActor(follow)
col := GetActorCollection(followersActor.Followers)
+
+ var nObj ObjectBase
+ nObj.Id = followersActor.Id
+
+ col.Items = append(col.Items, nObj)
+
for _, e := range col.Items {
- if !IsAlreadyFollowing(db, actorId, e.Id) && e.Id != Domain {
+ if !IsAlreadyFollowing(db, actorId, e.Id) && e.Id != Domain && e.Id != actorId {
followActivity := MakeFollowActivity(db, actorId, e.Id)
if FingerActor(e.Id).Id != "" {
MakeActivityRequestOutbox(db, followActivity)