Vibe.Gateway.Telegram.Update (vibe v0.2.0)

Copy Markdown View Source

Converts Telegram update maps/structs into Vibe gateway messages.

This module is the explicit boundary for Telegram's string/atom-keyed payloads. It accepts ExGram structs, decoded JSON maps, or test doubles by reading only known Bot API fields and emitting %Vibe.Gateway.Message{} plus trigger metadata for group gating.

Summary

Functions

Normalizes a Telegram update into a Vibe gateway message.

Types

normalized()

@type normalized() :: %{message: Vibe.Gateway.Message.t(), trigger: map()}

Functions

normalize(update, opts \\ [])

@spec normalize(
  term(),
  keyword()
) :: {:ok, normalized()} | :ignore | {:error, term()}

Normalizes a Telegram update into a Vibe gateway message.