Documentation
¶
Overview ¶
The layermap command keeps the Telegram Desktop version a client reports in step with the API layer of gotd, read from the tags of a tdesktop checkout.
A client that reports the app_version of Telegram Desktop in initConnection should report a version released on the layer it speaks (tg.Layer): a pair that no real client sends, such as a newer version on an older layer, sets the session apart. So does a session that goes on with an older version than the one that ran it before, as when a session of Telegram Desktop moves to an older client.
gen writes a table of the Desktop releases of each layer, so that the version follows the layer and updating gotd changes both:
//go:generate go run github.com/gotd/td/cmd/layermap gen -tdesktop ../../telegram/tdesktop -pkg device -o desktop_layers.go version, ok := device.DesktopVersion(tg.Layer)
check reads the version that last ran each tdata directory and tells whether the gotd of a module may run them, which gotd release to update to, or that none is out yet:
go run github.com/gotd/td/cmd/layermap check -tdesktop ../../telegram/tdesktop ~/sessions/*/tdata