Monorepo for Tangled tangled.org
859
fork

Configure Feed

Select the types of activity you want to include in your feed.

knotserver: add owners public keys to database on startup #270

open opened by willdot.net targeting master from willdot.net/tangled-fork: knot-owner-keys

When a knot is first created, the owners public keys are not available unless the owner manually adds them again via the appview.

This change will automatically get all the owners public keys from their PDS record and add them to the knotservers public keys database.

Labels

None yet.

assignee

None yet.

Participants 1
AT URI
at://did:plc:dadhhalkfcq3gucaq25hjqon/sh.tangled.repo.pull/3mknyooc7l422
+32 -28
Interdiff #2 #3
-1
knotserver/ingester.go
··· 436 436 437 437 id, err := h.resolver.Directory().LookupDID(ctx, syntax.DID(did)) 438 438 if err != nil { 439 - l.Error("lookup did to fetch keys", "did", did, "error", err) 440 439 return fmt.Errorf("lookup did to fetch keys: %w", err) 441 440 } 442 441
+1 -1
knotserver/router.go
··· 214 214 215 215 err = h.fetchAndAddKeys(ctx, cfgOwner) 216 216 if err != nil { 217 - h.l.Error("fetching and adding owners public keys", "error", err) 217 + h.l.Error("fetching and adding owners public keys", "error", err, "did", cfgOwner) 218 218 } 219 219 220 220 return nil
+21
blog/templates/fragments/topbar.html
··· 1 + {{ define "blog/fragments/topbar" }} 2 + <header class="max-w-screen-xl mx-auto w-full" style="z-index: 20;"> 3 + <nav class="mx-auto space-x-4 px-6 py-2"> 4 + <div class="flex justify-between p-0 items-center"> 5 + <div id="left-items"> 6 + <a href="https://tangled.org" class="text-2xl no-underline hover:no-underline flex items-center gap-2"> 7 + {{ template "fragments/logotypeSmall" }} 8 + </a> 9 + </div> 10 + 11 + <div id="right-items" class="flex items-center gap-4"> 12 + <a href="https://tangled.org/login">login</a> 13 + <span class="text-gray-500 dark:text-gray-400">or</span> 14 + <a href="https://tangled.org/signup" class="btn-create py-0 hover:no-underline hover:text-white flex items-center gap-2"> 15 + join now {{ i "arrow-right" "size-4" }} 16 + </a> 17 + </div> 18 + </div> 19 + </nav> 20 + </header> 21 + {{ end }}
+1 -19
blog/templates/index.html
··· 9 9 {{ define "bodyClasses" }}!bg-white dark:!bg-gray-900{{ end }} 10 10 11 11 {{ define "topbarLayout" }} 12 - <header class="max-w-screen-xl mx-auto w-full" style="z-index: 20;"> 13 - <nav class="mx-auto space-x-4 px-6 py-2"> 14 - <div class="flex justify-between p-0 items-center"> 15 - <div id="left-items"> 16 - <a href="/" hx-boost="true" class="text-2xl no-underline hover:no-underline flex items-center gap-2"> 17 - {{ template "fragments/logotypeSmall" }} 18 - </a> 19 - </div> 20 - 21 - <div id="right-items" class="flex items-center gap-4"> 22 - <a href="https://tangled.org/login">login</a> 23 - <span class="text-gray-500 dark:text-gray-400">or</span> 24 - <a href="https://tangled.org/signup" class="btn-create py-0 hover:no-underline hover:text-white flex items-center gap-2"> 25 - join now {{ i "arrow-right" "size-4" }} 26 - </a> 27 - </div> 28 - </div> 29 - </nav> 30 - </header> 12 + {{ template "blog/fragments/topbar" . }} 31 13 {{ end }} 32 14 33 15 {{ define "content" }}
+9 -7
blog/templates/post.html
··· 20 20 {{ define "bodyClasses" }}!bg-white dark:!bg-gray-900{{ end }} 21 21 22 22 {{ define "topbarLayout" }} 23 - <header class="max-w-screen-xl mx-auto w-full" style="z-index: 20;"> 24 - {{ template "layouts/fragments/topbar" . }} 25 - </header> 23 + {{ template "blog/fragments/topbar" . }} 26 24 {{ end }} 27 25 28 26 {{ define "footerLayout" }}{{ template "blog/fragments/footer" . }}{{ end }} ··· 33 31 34 32 <header class="not-prose mb-4"> 35 33 {{ $authors := .Post.Meta.Authors }} 36 - <p class="mb-1 text-sm text-gray-600 dark:text-gray-400"> 37 - {{ $date := .Post.ParsedDate }} 38 - {{ $date | shortTimeFmt }} 39 - </p> 34 + <div class="flex items-center gap-2 mb-1 text-sm text-gray-600 dark:text-gray-400"> 35 + <a href="/" class="flex items-center gap-1 text-gray-600 dark:text-gray-400">{{ i "arrow-left" "size-4" }} all posts</a> 36 + · 37 + <p> 38 + {{ $date := .Post.ParsedDate }} 39 + {{ $date | shortTimeFmt }} 40 + </p> 41 + </div class="flex items-center gap-2"> 40 42 41 43 <h1 class="mb-0 text-2xl font-bold dark:text-white"> 42 44 {{ .Post.Meta.Title }}

History

4 rounds 0 comments
sign up or login to add to the discussion
1 commit
expand
knotserver: add owners public keys to database on startup
merge conflicts detected
expand
  • blog/templates/index.html:9
  • blog/templates/post.html:20
expand 0 comments
1 commit
expand
knotserver: add owners public keys to database on startup
expand 0 comments
1 commit
expand
knotserver: add owners public keys to database on startup
expand 0 comments
1 commit
expand
knotserver: add owners public keys to database on startup
expand 0 comments