From 613b454b1208db3ce30865901f60f365513829d9 Mon Sep 17 00:00:00 2001 From: FChannel <=> Date: Mon, 25 Jan 2021 19:19:58 -0800 Subject: dont add activity actor to To list --- OutboxPost.go | 1 - main.go | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/OutboxPost.go b/OutboxPost.go index 262c7fd..fc96866 100644 --- a/OutboxPost.go +++ b/OutboxPost.go @@ -508,7 +508,6 @@ func ParseInboxRequest(w http.ResponseWriter, r *http.Request, db *sql.DB) { case "Create": for _, e := range activity.To { if IsActorLocal(db, e) { - fmt.Println("writing object to cache " + e) WriteObjectToCache(db, *activity.Object) } } diff --git a/main.go b/main.go index 95ed554..4a5ec35 100644 --- a/main.go +++ b/main.go @@ -1027,7 +1027,7 @@ func CreateObject(objType string) ObjectBase { func AddFollowersToActivity(db *sql.DB, activity Activity) Activity{ followers := GetActorFollowDB(db, activity.Actor.Id) - + var nActivity Activity for _, e := range followers { var tempActivity Activity @@ -1041,7 +1041,7 @@ func AddFollowersToActivity(db *sql.DB, activity Activity) Activity{ for _, k := range tempActivity.To { var alreadyTo = false for _, n := range nActivity.To { - if k == n { + if k == n || k == activity.Actor.Id { alreadyTo = true } } -- cgit v1.2.3