aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go12
1 files changed, 7 insertions, 5 deletions
diff --git a/main.go b/main.go
index be11e18..c6f55e8 100644
--- a/main.go
+++ b/main.go
@@ -1804,8 +1804,11 @@ func MakeActivityRequest(db *sql.DB, activity Activity) {
_, instance := GetActorInstance(actor.Id)
if actor.Inbox != "" {
+
req, err := http.NewRequest("POST", actor.Inbox, bytes.NewBuffer(j))
-
+
+ CheckError(err, "error with sending activity req to")
+
date := time.Now().UTC().Format(time.RFC1123)
path := strings.Replace(actor.Inbox, instance, "", 1)
@@ -1821,8 +1824,6 @@ func MakeActivityRequest(db *sql.DB, activity Activity) {
req.Header.Set("Signature", signature)
req.Host = instance
- CheckError(err, "error with sending activity req to")
-
_, err = http.DefaultClient.Do(req)
CheckError(err, "error with sending activity resp to")
@@ -1956,8 +1957,9 @@ func DeleteObjectRequest(db *sql.DB, id string) {
obj := GetObjectFromPath(db, id)
- activity.Actor.Id = obj.Actor.Id
-
+ actor := FingerActor(obj.Actor.Id)
+ activity.Actor = &actor
+
followers := GetActorFollowDB(db, obj.Actor.Id)
for _, e := range followers {
activity.To = append(activity.To, e.Id)