aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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")