aboutsummaryrefslogtreecommitdiff
path: root/cacheDatabase.go
diff options
context:
space:
mode:
authorFChannel <>2021-07-13 21:10:39 -0700
committerFChannel <>2021-07-13 21:10:39 -0700
commit05bfa634cf8c42123c8c0a19e65aff7320dadf41 (patch)
treebf838eec3a2ba77e61261d9c2cc28e04f1725cad /cacheDatabase.go
parent6ba4ff0a930f3a3c053af2553950fcfe5b5ad180 (diff)
added regex blacklist for posts in admin page
Diffstat (limited to 'cacheDatabase.go')
-rw-r--r--cacheDatabase.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/cacheDatabase.go b/cacheDatabase.go
index 7ab3b9e..deaed2e 100644
--- a/cacheDatabase.go
+++ b/cacheDatabase.go
@@ -5,6 +5,12 @@ import "database/sql"
import _ "github.com/lib/pq"
func WriteObjectToCache(db *sql.DB, obj ObjectBase) ObjectBase {
+
+ if(IsPostBlacklist(db, obj.Content)){
+ fmt.Println("\n\nBlacklist post blocked\n\n")
+ return obj
+ }
+
if len(obj.Attachment) > 0 {
if obj.Preview.Href != "" {
WritePreviewToCache(db, *obj.Preview)