aboutsummaryrefslogtreecommitdiff
path: root/cacheDatabase.go
diff options
context:
space:
mode:
Diffstat (limited to 'cacheDatabase.go')
-rw-r--r--cacheDatabase.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/cacheDatabase.go b/cacheDatabase.go
index 7ab3b9e..2fe0a38 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)
@@ -31,6 +37,11 @@ func WriteObjectToCache(db *sql.DB, obj ObjectBase) ObjectBase {
}
func WriteActorObjectToCache(db *sql.DB, obj ObjectBase) ObjectBase {
+
+ if(IsPostBlacklist(db, obj.Content)){
+ return obj
+ }
+
if len(obj.Attachment) > 0 {
if IsIDLocal(db, obj.Id) {