@@ -12,14 +12,21 @@ message ChannelInfoRequest {
1212 // Last post id the client has already read; used to compute the
1313 // unread badge (newmsg). 0 means "everything is unread".
1414 int64 last_read = 2 ;
15+ // By default avatar_path in the response carries a
16+ // "data:image/jpeg;base64,…" URI ready to drop into <img src>.
17+ // Set this to true to opt out and receive the legacy
18+ // "cache/<md5>.jpg" server-side file path instead.
19+ bool disable_inline_images = 3 ;
1520}
1621
1722message ChannelInfo {
1823 string name = 1 ;
1924 // Plain-text preview of the most recent post, or "فایل" if it is a media post.
2025 string description = 2 ;
21- // Local cache path of the avatar JPEG, relative to the cache dir
22- // returned by GetCacheDir(). Empty if the avatar could not be fetched.
26+ // By default this is a "data:image/jpeg;base64,…" URI ready for
27+ // <img src>. When the request set disable_inline_images=true it is
28+ // the legacy "cache/<md5>.jpg" file path relative to GetCacheDir().
29+ // Empty if the avatar could not be fetched.
2330 string avatar_path = 3 ;
2431 // Unix epoch seconds of the most recent post.
2532 int64 date = 4 ;
@@ -40,14 +47,25 @@ message ChannelMessagesRequest {
4047 // 0 = latest page; otherwise the "before" cursor returned by Telegram
4148 // (the data-before attribute of messages_more_wrap).
4249 int64 before = 2 ;
50+ // By default every image URL in the returned html and the
51+ // channel_avatar field is a "data:image/jpeg;base64,…" URI ready
52+ // to render. Set this to true to opt out: html and channel_avatar
53+ // will both carry the legacy "proxy.php?url=<hex>" placeholder
54+ // form, requiring per-image ProxyImage calls.
55+ bool disable_inline_images = 3 ;
4356}
4457
4558message ChannelMessagesResponse {
4659 // Pre-rendered HTML fragment ready to be injected into .main_block.
47- // Image URLs have been rewritten to call ProxyImage; dates have been
48- // converted to the Persian calendar.
60+ // Dates have been converted to the Persian calendar. By default
61+ // <img src> and background-image:url(...) carry inline
62+ // "data:image/jpeg;base64,…" payloads; with
63+ // disable_inline_images=true they carry "proxy.php?url=<hex>"
64+ // placeholders.
4965 string html = 1 ;
50- // Channel avatar URL embedded in the header (only set when before == 0).
66+ // Channel avatar embedded in the header (only set when before == 0).
67+ // "data:image/jpeg;base64,…" by default, "proxy.php?url=<hex>"
68+ // placeholder when disable_inline_images=true.
5169 string channel_avatar = 2 ;
5270 // Last post id seen on the page (mirrors the lastread_<chid> cookie).
5371 int64 last_post_id = 3 ;
0 commit comments