diff options
-rw-r--r-- | Database.go | 3 | ||||
-rw-r--r-- | OutboxPost.go | 2 | ||||
-rw-r--r-- | main.go | 2 |
3 files changed, 3 insertions, 4 deletions
diff --git a/Database.go b/Database.go index 640b941..06e8769 100644 --- a/Database.go +++ b/Database.go @@ -935,8 +935,6 @@ func DeleteObject(db *sql.DB, id string) { return } - - DeleteObjectRequest(db, id) DeleteReportActivity(db, id) DeleteAttachmentFromFile(db, id) DeletePreviewFromFile(db, id) @@ -950,7 +948,6 @@ func DeleteObjectAndReplies(db *sql.DB, id string) { return } - DeleteObjectAndRepliesRequest(db, id) DeleteReportActivity(db, id) DeleteAttachmentFromFile(db, id) DeletePreviewFromFile(db, id) diff --git a/OutboxPost.go b/OutboxPost.go index 7349b16..95a7714 100644 --- a/OutboxPost.go +++ b/OutboxPost.go @@ -556,7 +556,7 @@ func ParseInboxRequest(w http.ResponseWriter, r *http.Request, db *sql.DB) { if actor.Id != "" { for _, e := range activity.Object.Replies.OrderedItems { TombstoneObjectFromCache(db, e.Id) - DeleteObject(db, e.Id) + DeleteObject(db, e.Id) } TombstoneObjectFromCache(db, activity.Object.Id) break @@ -703,10 +703,12 @@ func main() { isOP := CheckIfObjectOP(db, obj.Id) if !isOP { + DeleteObjectRequest(db, id) DeleteObject(db, obj.Id) http.Redirect(w, r, r.Header.Get("Referer"), http.StatusSeeOther) return } else { + DeleteObjectAndRepliesRequest(db, id) DeleteObjectAndReplies(db, obj.Id) http.Redirect(w, r, r.Header.Get("Referer"), http.StatusSeeOther) return |