aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFChannel <>2021-06-06 19:57:04 -0700
committerFChannel <>2021-06-06 19:57:04 -0700
commit4cde44d9c4ac46f55f2004baf692fc05beb1f66e (patch)
tree10aee998be61236fc3e8db704b2fdd5c417f329b
parentf3a73b3a9f8b7895eeb54f007bde72126eae56d2 (diff)
checks for main actor when adding boards and following
-rw-r--r--main.go12
1 files changed, 11 insertions, 1 deletions
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")