mirror of
https://github.com/RedWizardsLab/EchoHub.git
synced 2026-09-05 23:34:09 +02:00
- Introduced NotificationConfig to manage notification settings, including sound file. - Added Notification.mp3 asset for notifications. - Implemented NotificationSoundService to handle playing notification sounds. - Enhanced ChatRenderer and MainWindow to support emoji rendering. - Updated MessageDto to allow multiple embeds per message. - Modified LinkEmbedService to fetch multiple embeds from message content. - Added data migration for legacy embed JSON format to new array format. - Adjusted embed handling in ChatService and IrcMessageFormatter to accommodate multiple embeds. - Updated HubConstants for new embed dimensions and limits.
1.5 KiB
1.5 KiB
v0.2.4 - Link Embeds
Features
OpenGraph Link Embeds
- Messages containing URLs now show a rich preview below the message text, similar to Discord
- Server-side fetching: detects the first URL in a message, fetches the page, and parses OpenGraph meta tags (
og:title,og:description,og:image,og:site_name) - OG images are converted to a small 24x12 colored ASCII thumbnail using the existing half-block renderer
- Embeds are persisted in the database and included in channel history
- TUI client renders embeds with a
▏left border bar — site name and border in blue, title in white, description in gray, followed by the ASCII thumbnail - IRC gateway receives a text-only embed preview (site name, title, description) — no ASCII thumbnail to keep IRC output clean
- Falls back to
<title>tag when no OG tags are present; gracefully skips if no useful metadata is found - 3-second fetch timeout ensures message delivery is never significantly delayed
- SSRF protection rejects private/loopback IP addresses before fetching
Infrastructure
- New
LinkEmbedServiceon the server — URL detection, HTML fetching (first 64KB), OG tag parsing via regex, image thumbnail generation EmbedDtorecord added to shared Core DTOs;MessageDtoextended with optionalEmbedfield (backward-compatible)EmbedJsonnullable column on theMessagetable stores serialized embed data (max 8KB)- Dedicated
"OgFetch"named HttpClient with bot User-Agent header and 5-second timeout - New EF Core migration:
AddMessageEmbed