Jido.Chat.Telegram.ParseMode (Jido Chat Telegram v1.1.0)

Copy Markdown View Source

Resolves Telegram parse_mode from adapter option maps.

Precedence:

  • explicit parse_mode option
  • canonical top-level format mapping
  • nil (no parse mode)

Summary

Functions

Returns the Telegram parse_mode for normalized option maps.

Functions

resolve_from_opts(opts)

@spec resolve_from_opts(map()) :: String.t() | nil

Returns the Telegram parse_mode for normalized option maps.

Supported format mappings:

  • :markdown / "markdown" -> "MarkdownV2"
  • :html / "html" -> "HTML"
  • :plain_text / "plain_text" -> nil

Unknown values are ignored and return nil.