Jido.Chat.Telegram.Adapter (Jido Chat Telegram v1.2.1)

Copy Markdown View Source

Telegram Jido.Chat.Adapter implementation using ExGram.

Summary

Functions

Deletes the Telegram webhook ingress subscription for a messaging bridge.

Ensures Telegram webhook ingress for a messaging bridge.

Returns Telegram extension capability statuses for features outside core adapter contract.

Fetches the bytes behind an inbound media reference.

Lists the Telegram webhook ingress subscription for a messaging bridge.

Functions

delete_ingress_subscription(bridge_id, subscription_id, opts \\ [])

@spec delete_ingress_subscription(String.t(), String.t(), keyword()) ::
  {:ok, map()} | {:error, term()}

Deletes the Telegram webhook ingress subscription for a messaging bridge.

ensure_ingress_subscription(bridge_id, opts \\ [])

@spec ensure_ingress_subscription(
  String.t(),
  keyword()
) :: {:ok, map()} | {:error, term()}

Ensures Telegram webhook ingress for a messaging bridge.

Telegram supports one webhook per bot token, so the subscription id is deterministic for the bridge and maps to the bot's current webhook.

extension_capabilities()

@spec extension_capabilities() :: map()

Returns Telegram extension capability statuses for features outside core adapter contract.

fetch_media(reference, opts \\ [])

@spec fetch_media(String.t() | map(), keyword() | map()) ::
  {:ok, binary()} | {:error, term()}

Fetches the bytes behind an inbound media reference.

Accepts a raw Telegram file id, a telegram://file/<file_id> reference, or a normalized media value carrying either form — the telegram:// scheme is minted here, so it is resolved here rather than by the caller.

list_ingress_subscriptions(bridge_id, opts \\ [])

@spec list_ingress_subscriptions(
  String.t(),
  keyword()
) :: {:ok, [map()]} | {:error, term()}

Lists the Telegram webhook ingress subscription for a messaging bridge.