aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorFChannel <>2021-07-15 15:24:39 -0700
committerFChannel <>2021-07-15 15:24:39 -0700
commita13a0d96f3808c17d9c50df1af400b73445f64ac (patch)
tree277e68f258ee7007571fdec62b8c19c3e521e14f /main.go
parente97c3e9d2d1bedf63a7d341eb199c9500bcd8cd9 (diff)
when using /g/followers or /g/following also follow the board g
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)