Skip to content

miniproto.messages.message_from_send_result

miniproto.messages.message_from_send_result

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

Normalize a send response, retaining supplied values when Telegram omits a message.

Parameters:

  • result (object) – Raw send result or update container.
  • peer (Peer) – Destination peer used as the fallback message peer.
  • text (str) – Submitted text used if no raw message is present.
  • entities (Iterable[object]) – Submitted entities used if Telegram did not return entities.

Returns:

  • Message – The sent message, with a zero ID and current UTC time only for incomplete responses.