Developer docs

9. Versioning

On this page
  • The protocol is versioned by layer (ClientHello.layer) and the package (televo.v1).
  • Within v1, changes are additive only (new fields, messages, methods, enum values). Clients must ignore unknown fields and treat unknown enum values / oneof cases as “unsupported” without failing.
  • Breaking changes go to televo.v2 and both are served side by side during migration.

9.1 New content types and unsupported messages (normative)

Message content grows over time (new Media kinds, ServiceAction kinds, Document.Kind values, entity types). Servers and clients follow these rules so that an older client never crashes, never drops a message and never draws an empty bubble.

Adding content (server / protocol authors):

  • New content types are additive: a new oneof case or enum value, never a changed meaning of an existing field or value. Do not reuse field numbers or enum values.
  • A new kind must not be encoded as a new value of an old field that old clients would render wrongly (e.g. a new Document.Kind falls back to KIND_FILE = 0 on old clients: that is acceptable only because clients detect the unknown value, below).
  • Where sensible, carry a plain-text fallback: keep the human-readable part in Message.text (caption semantics), and/or set the proposed Message.fallback_text (field 80, reserved in types.proto; e.g. “🎲 rolled a 6”, “Checklist: 3 items”). Clients built before the field exists already read it from the unknown fields. Server-generated push bodies are always rendered by the server, which knows every kind.

Rendering unknowns (clients):

A message is unsupported when any of:

  1. Message.media is set but its kind is not a case this client knows (protobuf: the case lands in the unknown fields, whichKind() = not set);
  2. anything below Message.media holds an enum value this client doesn’t know (protobuf keeps it in the unknown fields under the enum field’s tag; the field reads as default);
  3. Message.action is set with an unknown kind (or an unknown enum value below it);
  4. the message has nothing this client can draw (no text, media or action).

Unknown fields elsewhere in Message are ignored (new optional fields are additive), and an unknown MessageEntity.Type is rendered as plain text.

An unsupported message is shown as a bubble (a centred service chip for actions) reading “This message isn’t supported by your version of <app>.” with an Update button that opens the client’s update path, plus fallback_text above it when present and the caption below it. Chat-list previews, reply quotes and locally raised notifications show “Unsupported message”. Clients must keep the raw message (re-serialize with unknown fields preserved) so that it renders properly after the app is updated. Reference implementation: the Dart SDK’s unsupportedKind() / unsupportedFallbackText() (sdk/dart/lib/src/text/unsupported.dart).

Generated from docs/PROTOCOL.md in the Telvoro repository. Wire names such as televo.v1 are unchanged.