Normalize forum URLs as nostr events and rendered them as titles

This commit is contained in:
dtonon 2026-06-02 20:25:20 +01:00
parent fc51e33ceb
commit 2dc823d055
9 changed files with 262 additions and 57 deletions

View file

@ -4,6 +4,7 @@ import { RELAY_URL } from "$lib/config";
import { auth } from "$lib/auth.svelte";
import { ingestNostrUser } from "$lib/profiles.svelte";
import { extractMentionPubkeys, buildPTagHints } from "$lib/mentions";
import { convertForumUrls } from "$lib/linkify";
export type ChatMessageData = {
id: string;
@ -131,6 +132,8 @@ export async function sendChatMessage(
if (!currentGroup) throw new Error("No room selected");
const ownPubkey = await auth.signer.getPublicKey();
content = convertForumUrls(content);
const previousRefs = messages
.filter((m) => m.pubkey !== ownPubkey)
.slice(-3)