feat: support sending and preview links

This commit is contained in:
talksik
2026-03-21 12:46:23 -07:00
parent 6bf2f2217a
commit d6b7ecc8fd
8 changed files with 431 additions and 60 deletions
+14
View File
@@ -0,0 +1,14 @@
export interface LinkMetadata {
url: string;
title: string | null;
description: string | null;
image: string | null;
favicon: string | null;
domain: string;
}
const URL_REGEX = /https?:\/\/[^\s<>"')\]]+/g;
export function extractUrls(text: string): string[] {
return Array.from(text.matchAll(URL_REGEX), (m) => m[0]);
}