Oddbean new post about | logout

Notes by 822bf0a4 | export

 nostr is so full of bullshit you never know when its bug and when its "feature"

im not surprised at all neither cyberpunks nor mainstream is interested in this pile of shit 
 i think i understand what is the role of primal caching service.

its not to simply cache events.

its to externalize all user interaction from client to server
this basically means, server knows everything you do

in contrast, with other nostr clients, relays only receive some queries which may or may not contain some trackable information. 
 primal caching service is the backbone of primal. its the server side code. this server does a lot of stuff based on user pubkey.

normally nostr clients handle this kinds of stuff client side.

user_pubkey is sent to the server for handling, then server does some logic based on that. this is very unusual pattern in nostr.

settings = ext_user_get_settings(est, pubkey)
function ext_is_hidden_by_group(est::DB.CacheStorage, user_pubkey, scope::Symbol, pubkey::Nostr.PubKeyId); false; end
function ext_is_hidden_by_group(est::DB.CacheStorage, user_pubkey, scope::Symbol, eid::Nostr.EventId); false; end 
 just informing you all, primal web app sends user_pubkey to the server each time you view a thread. this is completely unecessary. probably used for logging user browsing activity.
 
 njump/content_filtering.go

```
func hasProhibitedWordOrTag(event *nostr.Event) bool {
	for _, tag := range event.Tags {
		if len(tag) >= 2 && tag[0] == "t" && slices.Contains(pornTags, strings.ToLower(tag[1])) {
			return true
		}
	}

	return pornWordsRe.MatchString(event.Content)
}

// list copied from https://jsr.io/@gleasonator/policy/0.2.0/data/porntags.json
var pornTags = []string{
	"adult",
	"ass",
	"assworship",
	"boobs",
	"boobies",
	"butt",
	"cock",
	"dick",
	"dickpic",
	"explosionloli",
	"femboi",
	"femboy",
	"fetish",
	"fuck",
	"freeporn",
	"girls",
	"lewd",
	"loli",
	"milf",
	"naked",
	"nude",
	"nudes",
	"nudeart",
	"nudity",
	"nsfw",
	"pantsu",
	"pussy",
	"porn",
	"porngif",
	"porno",
	"pornstar",
	"porntube",
	"pornvideo",
	"sex",
	"sexpervertsyndicate",
	"sexporn",
	"sexworker",
	"sexy",
	"slut",
	"teen",
	"tits",
	"teenporn",
	"teens",
	"transnsfw",
	"xxx",
}

var pornWordsRe = func() *regexp.Regexp {
	// list copied from https://jsr.io/@gleasonator/policy/0.2.0/data/pornwords.json
	pornWords := []string{
		"loli",
		"nsfw",
		"teen porn",
	}
	concat := strings.Join(pornWords, "|")
	regex := fmt.Sprintf(`\b(%s)\b`, concat)
	return regexp.MustCompile(regex)
}()
```