aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go11
1 files changed, 10 insertions, 1 deletions
diff --git a/main.go b/main.go
index 4976fcf..55c97cd 100644
--- a/main.go
+++ b/main.go
@@ -1029,7 +1029,16 @@ func AddFollowersToActivity(db *sql.DB, activity Activity) Activity{
followers := GetActorFollowDB(db, activity.Actor.Id)
for _, e := range followers {
- activity.To = append(activity.To, e.Id)
+ var alreadyTo = false
+ for _, k := range activity.To {
+ if k == e.Id {
+ alreadyTo = true
+ }
+ }
+
+ if !alreadyTo {
+ activity.To = append(activity.To, e.Id)
+ }
}
return activity