diff options
author | FChannel <> | 2021-06-19 19:04:43 -0700 |
---|---|---|
committer | FChannel <> | 2021-06-19 19:04:43 -0700 |
commit | b4f7d00ad9d13f96323366ded2eb7702e37f6e52 (patch) | |
tree | 8a62817f7d1f70131533c2ab96f91270e0ad64db /database.go | |
parent | 6b265b0a8c2e45422f4a4601e041d44e5cef1c1b (diff) |
admin can mark objects as senstive
Diffstat (limited to 'database.go')
-rw-r--r-- | database.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/database.go b/database.go index 7fdbb5e..5e6e960 100644 --- a/database.go +++ b/database.go @@ -1476,3 +1476,15 @@ func GetActorPemFromDB(db *sql.DB, pemID string) PublicKeyPem { return pem } + +func MarkObjectSensitive(db *sql.DB, id string, sensitive bool) { + var query = `update activitystream set sensitive=$1 where id=$2` + _, err := db.Exec(query, sensitive, id) + + CheckError(err, "error updating sensitive object in activitystream") + + query = `update cacheactivitystream set sensitive=$1 where id=$2` + _, err = db.Exec(query, sensitive, id) + + CheckError(err, "error updating sensitive object in cacheactivitystream") +} |