Browse Source

Add TODOs for next steps

master
buttercat1791 8 months ago
parent
commit
cccbb01e3a
  1. 3
      src/lib/utils/nostrUtils.ts
  2. 2
      src/routes/publication/[type]/[identifier]/+layout.server.ts
  3. 1
      src/routes/publication/[type]/[identifier]/+layout.svelte

3
src/lib/utils/nostrUtils.ts

@ -430,6 +430,9 @@ Promise.prototype.withTimeout = function <T>( @@ -430,6 +430,9 @@ Promise.prototype.withTimeout = function <T>(
return withTimeout(timeoutMs, this);
};
// TODO: Implement fetch for no-auth relays using the WebSocketPool and raw WebSockets.
// This fetch function will be used for server-side loading.
/**
* Fetches an event using a two-step relay strategy:
* 1. First tries standard relays with timeout

2
src/routes/publication/[type]/[identifier]/+layout.server.ts

@ -5,6 +5,8 @@ import { getMatchingTags, fetchEventById, fetchEventByDTag, fetchEventByNaddr, f @@ -5,6 +5,8 @@ import { getMatchingTags, fetchEventById, fetchEventByDTag, fetchEventByNaddr, f
export const load: LayoutServerLoad = async ({ params, parent, url }) => {
const { type, identifier } = params;
// TODO: Remove the need for NDK in nostrUtils dependencies, since NDK is not available on the server.
// deno-lint-ignore no-explicit-any
const { ndk } = (await parent()) as any;

1
src/routes/publication/[type]/[identifier]/+layout.svelte

@ -5,6 +5,7 @@ @@ -5,6 +5,7 @@
const { metadata } = data;
</script>
<!-- TODO: Provide fallback metadata values to use if the publication is on an auth-to-read relay. -->
<svelte:head>
<!-- Basic meta tags -->
<title>{metadata.title}</title>

Loading…
Cancel
Save