diff --git a/activity.go b/activity.go index db5228c..0700085 100644 --- a/activity.go +++ b/activity.go @@ -1433,7 +1433,6 @@ func ingestpubkey(origin string, obj junk.Junk) { if err != nil { log.Printf("error saving key: %s", err) } - return } func ingestboxes(origin string, obj junk.Junk) { diff --git a/docs/changelog.txt b/docs/changelog.txt index f750a3c..418a5b3 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -2,6 +2,8 @@ changelog -- next ++ Fix bug preventing import of keys + -- 0.8.2 ++ Import command to preserve those embarssassing old posts from Twitter. diff --git a/fun.go b/fun.go index 12be36e..a2371ea 100644 --- a/fun.go +++ b/fun.go @@ -594,15 +594,17 @@ var zaggies = cache.New(cache.Options{Filler: func(keyname string) (*rsa.PublicK allinjest(originate(keyname), j) row = stmtGetXonker.QueryRow(keyname, "pubkey") err = row.Scan(&data) - } - if err == nil { - _, key, err := httpsig.DecodeKey(data) if err != nil { - log.Printf("error decoding %s pubkey: %s", keyname, err) + log.Printf("key not found after ingesting") + return nil, true } - return key, true } - return nil, true + _, key, err := httpsig.DecodeKey(data) + if err != nil { + log.Printf("error decoding %s pubkey: %s", keyname, err) + return nil, true + } + return key, true }, Limit: 512}) func zaggy(keyname string) *rsa.PublicKey {