switch to using user 1 key for gets because elephants are dumb

This commit is contained in:
Ted Unangst 2022-12-26 13:27:39 -05:00
parent b68d449c02
commit ccbff8b7db
3 changed files with 6 additions and 5 deletions

View File

@ -371,7 +371,7 @@ var boxofboxes = cache.New(cache.Options{Filler: func(ident string) (*Box, bool)
if err != nil { if err != nil {
dlog.Printf("need to get boxes for %s", ident) dlog.Printf("need to get boxes for %s", ident)
var j junk.Junk var j junk.Junk
j, err = GetJunk(serverUID, ident) j, err = GetJunk(readyLuserOne, ident)
if err != nil { if err != nil {
dlog.Printf("error getting boxes: %s", err) dlog.Printf("error getting boxes: %s", err)
return nil, false return nil, false
@ -1474,7 +1474,7 @@ func doesitmatter(what string) bool {
func collectiveaction(honk *Honk) { func collectiveaction(honk *Honk) {
user := getserveruser() user := getserveruser()
for _, ont := range honk.Onts { for _, ont := range honk.Onts {
dubs := getnameddubs(serverUID, ont) dubs := getnameddubs(readyLuserOne, ont)
if len(dubs) == 0 { if len(dubs) == 0 {
continue continue
} }
@ -1588,7 +1588,7 @@ var handfull = cache.New(cache.Options{Filler: func(name string) (string, bool)
return href, true return href, true
} }
dlog.Printf("fishing for %s", name) dlog.Printf("fishing for %s", name)
j, err := GetJunkFast(serverUID, fmt.Sprintf("https://%s/.well-known/webfinger?resource=acct:%s", m[1], name)) j, err := GetJunkFast(readyLuserOne, fmt.Sprintf("https://%s/.well-known/webfinger?resource=acct:%s", m[1], name))
if err != nil { if err != nil {
ilog.Printf("failed to go fish %s: %s", name, err) ilog.Printf("failed to go fish %s: %s", name, err)
return "", true return "", true
@ -1633,7 +1633,7 @@ func investigate(name string) (*SomeThing, error) {
if name == "" { if name == "" {
return nil, fmt.Errorf("no name") return nil, fmt.Errorf("no name")
} }
obj, err := GetJunkFast(serverUID, name) obj, err := GetJunkFast(readyLuserOne, name)
if err != nil { if err != nil {
return nil, err return nil, err
} }

2
fun.go
View File

@ -643,7 +643,7 @@ var zaggies = cache.New(cache.Options{Filler: func(keyname string) (httpsig.Publ
data := getxonker(keyname, "pubkey") data := getxonker(keyname, "pubkey")
if data == "" { if data == "" {
dlog.Printf("hitting the webs for missing pubkey: %s", keyname) dlog.Printf("hitting the webs for missing pubkey: %s", keyname)
j, err := GetJunk(serverUID, keyname) j, err := GetJunk(readyLuserOne, keyname)
if err != nil { if err != nil {
ilog.Printf("error getting %s pubkey: %s", keyname, err) ilog.Printf("error getting %s pubkey: %s", keyname, err)
when := time.Now().UTC().Format(dbtimeformat) when := time.Now().UTC().Format(dbtimeformat)

View File

@ -68,6 +68,7 @@ type KeyInfo struct {
} }
const serverUID int64 = -2 const serverUID int64 = -2
const readyLuserOne int64 = 1
type Honk struct { type Honk struct {
ID int64 ID int64