diff options
author | FChannel <> | 2021-06-06 19:57:04 -0700 |
---|---|---|
committer | FChannel <> | 2021-06-06 19:57:04 -0700 |
commit | 4cde44d9c4ac46f55f2004baf692fc05beb1f66e (patch) | |
tree | 10aee998be61236fc3e8db704b2fdd5c417f329b /main.go | |
parent | f3a73b3a9f8b7895eeb54f007bde72126eae56d2 (diff) |
checks for main actor when adding boards and following
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -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") |