Skip to content

miniproto.messages.message_from_update_result

miniproto.messages.message_from_update_result

Section titled “miniproto.messages.message_from_update_result”
message_from_update_result(result: object, *, fallback_peer: Peer, fallback_text: str, entities: Iterable[object] = ()) -> Message

Normalize an update response or create a fallback message when none is present.

The fallback has ID 0 and the current UTC time, preserving submitted text and entities for response forms that do not carry a message object.

Parameters:

  • result (object) – Raw update or response container to inspect.
  • fallback_peer (Peer) – Peer used when no concrete message is found.
  • fallback_text (str) – Submitted text used by the synthetic fallback.
  • entities (Iterable[object]) – Submitted entities used when a concrete message omits entities.