mirror of
https://github.com/aykhans/bsky-feedgen.git
synced 2025-05-31 02:50:03 +00:00
Add 'azInvalidUser' condition to az generator
This commit is contained in:
parent
588cfc0fcc
commit
74b8324b6f
@ -13,6 +13,10 @@ import (
|
||||
"go.mongodb.org/mongo-driver/mongo/options"
|
||||
)
|
||||
|
||||
var azInvalidUser []string = []string{
|
||||
"did:plc:5zww7zorx2ajw7hqrhuix3ba",
|
||||
}
|
||||
|
||||
var azValidUsers []string = []string{
|
||||
"did:plc:jbt4qi6psd7rutwzedtecsq7",
|
||||
"did:plc:yzgdpxsklrmfgqmjghdvw3ti",
|
||||
@ -124,6 +128,10 @@ func (generator *FeedGeneratorAz) IsValid(post *collections.Post) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
if slices.Contains(azInvalidUser, post.DID) {
|
||||
return false
|
||||
}
|
||||
|
||||
if slices.Contains(azValidUsers, post.DID) || // Posts from always-valid users
|
||||
(slices.Contains(post.Langs, "az") && len(post.Langs) < 3) || // Posts in Azerbaijani language with fewer than 3 languages
|
||||
generator.textRegex.MatchString(post.Text) { // Posts containing Azerbaijan-related keywords
|
||||
|
Loading…
x
Reference in New Issue
Block a user