MadelineProto 8.8.9 fixes the issues of 8.8.8 (most importantly, it goes back to layer 230: 8.8.8 used an abandoned schema, which could make some requests hang), and adds RTMP livestream publishing in pure PHP, message filters for in-call messages and 9 new languages.
Features:
- Publish to RTMP livestreams with
play(): MP4 or Matroska files with H.264 video and AAC audio are published to the livestream over RTMP by MadelineProto itself, in pure PHP and without transcoding. Only admins can publish (the firstplay()fetches the ingest URL and key); joining only watches, so recording a livestream published by another encoder doesn't take it over. Telegram scales every RTMP livestream to 1280x720 without keeping the aspect ratio: other aspect ratios log a warning. - Message filters (commands, text, regexes, sender, incoming/outgoing, peer) now apply to in-call messages of group calls and conference calls, which now have
command,commandType,commandArgs,matches,matchesAllandout, and, for group calls, the peer of their call. - MadelineProto is now translated into Spanish, Arabic, Turkish, Ukrainian, Indonesian, Hindi, Vietnamese, Japanese and Korean, and the German, Polish, French, Central Kurdish, Portuguese and Russian translations are complete (fixing wrong Russian and Kurdish strings, and broken Chinese, Italian and Uzbek ones). Translations are now edited in
langs/, not on Weblate. - Base64 MTProxy secrets, including URL-safe and
dd-prefixed ones, by @bertmsk in #1717 and @danog. Malformed secrets, and fake TLS (ee) secrets, which aren't supported, are now refused with an explicit error instead of producing a wrong key. - Cryptography uses OpenSSL and libsodium when available (obfuscated transport, CDN files, RSA, DTLS, and the Ed25519/X25519 keys of E2E conferences), and phpseclib only without them.
- The phar is now named
madeline.phar(madeline81.pharis still uploaded for oldermadeline.phpfiles).
Fixes:
- Back to layer 230: 8.8.8 used tdesktop's layer 231 schema, which was abandoned, with constructors the server doesn't send (like
userFull), so some results couldn't be deserialized. - Requests whose result can't be deserialized now fail with the deserialization error: the read loop of the connection exited instead, and the request was resent forever, never returning.
- Connections that silently stop working (half-open TCP connections, dropped by a NAT for example) are now replaced when a state request goes unanswered, instead of waiting for every request to time out.
- Fix the update loop dying on RPC timeouts in
getDifference/getChannelDifferenceby @xcgu in #1756 - Sessions saved with phpseclib up to 3.0.45 (MadelineProto up to at least 8.4.12) can be loaded again: they failed with a TypeError after the upgrade to phpseclib 4.
- Session files are now synced to disk before replacing the old one: a crash or power loss (on f2fs, for example) could leave a session file made of zeroes.
- Restored calls are resumed once the session is reset, and requests in flight are sent again on session resets: on every restart, the requests of restored calls (and
users.getUsersinonStart) timed out after 60 seconds. - Files are played into calls at their real speed without a lookahead (they were played at about 80% of it), and the frames due while a call connects are no longer sent all at once.
playOnHold()replaces the hold file being played right away, instead of after its end.- transport-cc is no longer used in one-to-one calls, since MadelineProto doesn't send its feedback.
- Recording RTMP livestreams works: MP4 chunks with the moov after the mdat are demuxed, the stream start is taken from its video channel, and recordings wait for the first chunk with video. MP4 timestamps are now presentation timestamps (video with B-frames was 80 ms late).
- Group calls take the bare stream DC ID like tdesktop, fixing streams whose DC ID the server sends shifted.
- New sessions with Prometheus metrics enabled no longer fail to start their IPC worker with "Address already in use".
importAuthorization()uses the imported DC by default, not DC 1 (which failed with "No info for DC 1" on the test servers).- Round videos with an audio attribute (Telegram now adds one with the waveform) are video notes again, not audio files.
- Uploads of bot API file IDs are resumed after a restart.
- Profile photos from bot API file IDs are downloaded in the size of the file ID (not always the big one), even when the peer isn't in the database.
Internal:
- The CI moved from Woodpecker to GitHub Actions: the full test suite runs on pushes and tags (with user sessions on Telegram's test servers), pull requests run what needs no secret, a daily build submits the schema and docs updates as pull requests, and releases are drafted, described and announced automatically from the release labels of pull requests.
What's Changed
Other changes
Full Changelog: 8.8.8...8.8.9