From a13a0d96f3808c17d9c50df1af400b73445f64ac Mon Sep 17 00:00:00 2001 From: FChannel <> Date: Thu, 15 Jul 2021 15:24:39 -0700 Subject: when using /g/followers or /g/following also follow the board g --- main.go | 16 ++++++++++++++-- static/manage.html | 7 ++++--- 2 files changed, 18 insertions(+), 5 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) diff --git a/static/manage.html b/static/manage.html index a9dc47e..2647532 100644 --- a/static/manage.html +++ b/static/manage.html @@ -22,12 +22,13 @@ {{ if .IsLocal }}