From 4cde44d9c4ac46f55f2004baf692fc05beb1f66e Mon Sep 17 00:00:00 2001 From: FChannel <> Date: Sun, 6 Jun 2021 19:57:04 -0700 Subject: checks for main actor when adding boards and following --- main.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index dd6e25a..be11e18 100644 --- a/main.go +++ b/main.go @@ -437,7 +437,13 @@ func main() { var obj ObjectBase - nactor := FingerActor(r.FormValue("actor")) + var nactor Actor + if r.FormValue("actor") == Domain { + nactor = GetActorFromDB(db, r.FormValue("actor")) + } else { + nactor = FingerActor(r.FormValue("actor")) + } + followActivity.Actor = &nactor followActivity.Object = &obj @@ -1748,6 +1754,10 @@ func GetActorReported(w http.ResponseWriter, r *http.Request, db *sql.DB, id str func MakeActivityRequestOutbox(db *sql.DB, activity Activity) { j, _ := json.Marshal(activity) + if activity.Actor.Outbox == "" { + return + } + req, err := http.NewRequest("POST", activity.Actor.Outbox, bytes.NewBuffer(j)) CheckError(err, "error with sending activity req to outbox") -- cgit v1.2.3