Add users mention with search and autocomplete

This commit is contained in:
dtonon 2026-04-21 11:18:32 +01:00
parent 1ff1c225c5
commit be7c5a38ba
6 changed files with 656 additions and 12 deletions

View file

@ -3,6 +3,7 @@ import { loadNostrUser, type NostrUser } from "@nostr/gadgets/metadata";
import { RELAY_URL, GROUP_ID } from "$lib/config";
import { threads as mockThreads } from "$lib/mock";
import { auth } from "$lib/auth.svelte";
import { ingestNostrUser } from "$lib/profiles.svelte";
const isNostrId = (id: string) => /^[0-9a-f]{64}$/.test(id);
@ -33,6 +34,7 @@ async function loadProfile(pubkey: string) {
if (profiles[pubkey]) return;
const user = await loadNostrUser(pubkey);
profiles[pubkey] = user;
ingestNostrUser(user);
}
function loadMockThread(id: string) {