Table of Contents

Class LinkEmbedService

Namespace
EchoHub.Server.Services
Assembly
EchoHub.Server.dll
public class LinkEmbedService
Inheritance
LinkEmbedService
Inherited Members

Constructors

LinkEmbedService(IHttpClientFactory, ILogger<LinkEmbedService>)

public LinkEmbedService(IHttpClientFactory httpClientFactory, ILogger<LinkEmbedService> logger)

Parameters

httpClientFactory IHttpClientFactory
logger ILogger<LinkEmbedService>

Methods

TryGetEmbedsAsync(string)

Detect all URLs in message content and attempt to fetch OG embed data for each. Returns null if no URLs found or all fetches fail. Never throws — all errors are caught internally.

public Task<List<EmbedDto>?> TryGetEmbedsAsync(string content)

Parameters

content string

Returns

Task<List<EmbedDto>>