From b4f7d00ad9d13f96323366ded2eb7702e37f6e52 Mon Sep 17 00:00:00 2001 From: FChannel <> Date: Sat, 19 Jun 2021 19:04:43 -0700 Subject: admin can mark objects as senstive --- database.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'database.go') 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") +} -- cgit v1.2.3