From 8e9ae1dcaccf9d58b29865f296c01c5ace1f581b Mon Sep 17 00:00:00 2001 From: Adrien Hopkins Date: Tue, 26 Aug 2025 10:31:06 -0500 Subject: Determine DM recipient's pubkey --- src/routes/(app)/dm/[recipient]/+page.server.ts | 9 ++++---- src/routes/(app)/dm/[recipient]/+page.svelte | 28 +++++++++++++------------ 2 files changed, 20 insertions(+), 17 deletions(-) (limited to 'src') diff --git a/src/routes/(app)/dm/[recipient]/+page.server.ts b/src/routes/(app)/dm/[recipient]/+page.server.ts index e202d8b4..0a320137 100644 --- a/src/routes/(app)/dm/[recipient]/+page.server.ts +++ b/src/routes/(app)/dm/[recipient]/+page.server.ts @@ -1,5 +1,6 @@ -export function load({ params }) { - return { - recipient: params.recipient - }; +import { get } from "$lib/utils"; + +export async function load({ params }) { + const recipient = await get(`/users/${params.recipient}`); + return { recipient }; } diff --git a/src/routes/(app)/dm/[recipient]/+page.svelte b/src/routes/(app)/dm/[recipient]/+page.svelte index c65931f5..aff22eed 100644 --- a/src/routes/(app)/dm/[recipient]/+page.svelte +++ b/src/routes/(app)/dm/[recipient]/+page.svelte @@ -1,22 +1,24 @@
- - - + + + -
-

Direct Messages

-

You are sending nostr messages to {data.recipient}.

+
+

Direct Messages

+

Testing Message: You are sending nostr messages to {recipient.username}. Their pubkey is {recipient.pubkey}.

-- cgit v1.2.3