diff options
author | FChannel <=> | 2021-01-28 20:07:49 -0800 |
---|---|---|
committer | FChannel <=> | 2021-01-28 20:07:49 -0800 |
commit | 0d4cd485b5225cfa737842de6ba0e96d6d21722b (patch) | |
tree | e436f9596e5b34434e53753768455bd755ad8070 | |
parent | 26db3d04944e838e6de5aeb736c59982ed226c48 (diff) |
removed delete request inside DB delete
-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 |