Skip to content

Repository files navigation

tele

a telegram desktop fork. it isn't a real fork of the code: this repo only holds a queue of patches that get applied on top of every stable tdesktop release and built here automatically.

download

grab the latest build from releases.

  • windows x64: tele-<version>-win64.zip. unpack it anywhere and run tele.exe. it keeps its data next to the exe.

  • linux x64: tele-<version>-linux64.zip. unpack it somewhere you can write to (like ~/.local/opt/tele) and run ./tele. it keeps its data in ~/.local/share/tele and adds itself to the app menu.

  • macos (apple silicon and intel): tele-<version>-macos.dmg. open it, drag tele into applications, then run this once in the terminal, since the build isn't notarized by apple (the .zip next to it is what the self-updater downloads):

    xattr -dr com.apple.quarantine /Applications/tele.app
    

    it keeps its data in ~/Library/Application Support/tele.

none of them touch an installed telegram or its data.

tele updates itself: it checks these releases every 3 hours, downloads new builds in the background and asks you to restart. the update feed is signed, so a build that isn't from here won't be installed. you can turn it off in settings → tele → updates.

every zip and dmg has a build provenance attestation: github signs that the file was built by this repo's workflow from a given commit and hasn't changed since. check a download with the github cli:

gh attestation verify tele-<version>-win64.zip --repo nitreojs/tele

patches

everything tele adds lives in settings → tele, right below the language row, grouped into pages: interface, chats, messages, sending, notifications, menus (beta), privacy, profiles and ids, bots and debug, with server, backup and updates on the page itself. the search at the top of the page, and the main settings search, find every tele setting. backup exports your tele settings to a file you can give to anyone, and imports one with a preview of what changes.

all 178 patches, newest release first
# what it does where to toggle
128 hide the gift button in the message field tele → sending, off
129 bookmark messages from the message menu and jump back to them from the chat menu. after you send a message while scrolled up, a button returns you to where you were reading tele → messages, off
130 pin sticker and emoji sets to the front of the panel tele → chats, off
131 send silently by default, everywhere or per chat from the chat menu. the send menu offers sending with sound instead tele → notifications, off
132 hide message previews in the chat list, with compact rows tele → interface, off
133 stickers, gifs and voice messages wait for a second click before sending tele → sending, off
134 turn off touchpad gestures: swipe to reply and swipe back, each switchable tele → chats, off
135 hide similar channels after joining and in profiles, each switchable tele → chats, off
136 hide unread counters on folder tabs and the taskbar or tray, leave out the archive, and leave out accounts from their right-click menu tele → notifications, off
137 hide or show the pinned bar from the chat menu in chats where you can't unpin tele → chats, on
138 voice messages record without the fade-in at the start tele → sending, off
139 the tele chat's profile card closes after a window resize on macos always on
140 turn off telegram's ai features with one switch tele → chats, off
141 choose the map service that opens locations tele → messages → open links in apps
142 copy messages as markdown or html from the message menu tele → menus, off
143 r loops the video in the media viewer always on
144 emoji you type count in recent emoji always on
145 long code blocks get line numbers, in regular and rich messages tele → messages, off
146 no tooltip for collectible statuses in profiles tele → profiles and ids, off
147 link rewrites can change only the link preview and keep your link as it is with 78
148 right-clicking beside a bubble opens its message menu tele → menus, off
149 the shot box is taller, shots send from attached media above the field, and the draft button is centered always on
150 the message menu keeps showing when a private chat read your message, even after telegram stops telling tele → messages, on
151 calcmula suggestions while typing, each can be sent as its own result, and alt+enter sends without calculating with 82
152 view as tl opens inside tele, titled with the object's constructor. with -teleoffline it opens in the browser with 33
153 {build} in the title bar label is the bare build number, the default label is TELE #{build}, and custom labels are updated once with 10
154 choose which deleted messages to keep: in bot chats, in saved messages, and the ones you delete yourself with 19
155 the interface scale slider moves in 1% steps tele → interface, off
156 .mkv files are sent as videos always on
157 reduce motion: every animation limit except calls on, no sticker loops, reaction bursts or message effects. turning it off restores your settings tele → interface, off
158 get a notification when chosen people come online, from their profile or chat menu tele → notifications, off
159 mute a whole folder on this device, and silence chats completely, mentions and replies included tele → notifications, on
160 send an audio file as a voice message with a waveform, from its right-click menu in the send box tele → sending, on
161 downloads go into a folder per chat, and any chat can get its own folder from the chat menu tele → sending, off
162 drag the edge above the message field to set its minimum height tele → sending, off
163 streamer mode: tele is hidden from screen capture, notifications show no names or text, and your phone number is hidden tele → privacy, off
164 translate your message before sending from the field's right-click menu or the send menu. ctrl+z brings the original back tele → sending, on
165 an unsorted folder with every chat that isn't in another folder, archived ones aside tele → interface, off
166 gif frames show for their own duration, and downloads with the same name no longer overwrite each other always on
167 saved gifs and favorite stickers past telegram's limit stay on this device tele → chats, off
168 alt+click selects chats, shift+click a range. a bar marks them read, archives, mutes, adds them to a folder, deletes or leaves them tele → interface, off
169 hide messages by keyword or regex, everywhere and per chat, like ignored users tele → privacy
170 tele's menu items only show while their feature is on, and each one can be turned off always on
171 a .* button in the chat search finds messages by regex among the loaded ones, without asking the server tele → chats, off
172 tele settings are split into interface, chats, messages, sending, notifications, menus, privacy, profiles and ids, bots and debug. old links still work always on
173 a setting with sub-settings folds them away, shows how many are on and switches them all off without forgetting them always on
174 tele's own layout for the message, chat, profile, chat list, folder, send and field menus, with groups and submenus. an editor rearranges, hides and groups items with a live preview and presets, alt+right-click opens it from a menu tele → menus
175 the mobile row is hidden in every profile, yours included tele → profiles and ids, off
176 the name in a quote of a deleted message can link to the author's profile or mention them with 19
177 the sending animation lands on the message even when another message arrives during it always on
178 attaching media above the field is out of beta with 109
# what it does where to toggle
109 attach media above the input field instead of in a full-window box: reorder, remove, group or send as files right there, edit photos, see the album as a grid, and the unsent media stays in the chat tele → sending, off
110 checkmarks and custom verification from the tele server show on a profile's personal channel too always on
111 when a version's changelog can't be found, the tele chat says so instead of doing nothing always on
112 after an update, a new in tele page lists the settings that version added. the what's new message links to it always on
113 tele never blocks screenshots, screen recording or screen sharing, protected chats and disappearing media included tele → privacy, on
114 choose what shots show: names, userpics, reactions, time and checks, replies, forwarded headers, buttons and link previews with 89
115 setting descriptions only say what their names can't always on
116 forward messages from chats that forbid it: tele sends copies and uploads their media again tele → messages, off
117 videos stop at their end, and play starts them again always on
118 attached media above the field get a caption each and everything the send box has: self-destruct timer, caption above, hd, price, effects and the send menu. they can be saved as drafts, which keep video edits and price, and an edited draft video says its edits apply when sent with 109
119 settings that only matter while another one is on stay hidden until it is always on
120 hide communities: their chats stay in the list as regular chats tele → interface, off
121 replies to messages older than the uploading media don't wait in the queue with 51
122 enter twice sends a queued message right away with 51
123 the sending settings are split into sending order, uploads, message field and scheduled messages always on
124 username aliases work for inline bots too: @alias query asks the real bot with 72
125 the options that hide the mentions and reactions buttons also hide the @ and ❤️ badges in the chat list and topic tabs with 73
126 pin more chats than telegram allows: the extra pins stay on this device, have a hollow pin icon and can be dragged anywhere among the server pins tele → interface, off
127 more folders and more chats per folder than telegram allows: what doesn't fit stays on this device tele → interface, off
# what it does where to toggle
84 chats move to their new place in the chat list right away, without the pause while the mouse moves over the list tele → interface, off
85 collectible usernames and numbers show their dollar price at the purchase date, not today's tele → profiles and ids, off
86 your own app and tray icons from any image, and the tray icon can follow the app icon tele → interface → app icon
87 choose when links get previews: for all links, not for pasted links, or only ones you add. add a preview of any link to any message, with its size and position tele → messages
88 in the link box (ctrl+k), @username becomes a t.me link always on
89 shot: save selected messages, or one message, as a picture from the message menu, with or without the chat background and dates tele → menus, off
90 a debug page: debug logs on or off, open the logs or tele folder, clear logs, and an mtproto inspector for the logs that filters requests, expands objects, opens entries on schema.jppgr.am and opens things from message and chat menus tele → debug
91 tele's own app and tray icons always on
92 the menu item is called copy callback data, like in telegram with 28
93 the tele server can give accounts extra @usernames, see running your own server. a server username wins over the real one, your own aliases win over both tele → server, on
94 custom emoji in rich messages and in emoji-only messages open their pack on click, and every pack is counted always on
95 send gifs as videos and videos as gifs: in the send box, from a message's menu, and with right-click in the gif panel always on
96 drafts stay on this device and never go to the cloud. a button clears the ones already there tele → privacy, off
97 scheduled messages are sent by tele itself at the set time while it's online tele → sending, off
98 when both are shown, the dc goes next to the id in one profile row tele → profiles and ids, off
99 a new title template editor: variables as chips, a palette with modifiers and presets with 10
100 edited scheduled messages don't show junk reply counters always on
101 saved drafts: keep several drafts per chat, with media or rich messages, in a drafts section that looks like a chat. edit them like messages, send them now or to another chat, and bring back drafts you discarded tele → sending → drafts
102 photos go out in hd by default tele → sending, on
103 chat search finds chats by their aliases, yours and the server's with 72
104 the seen and reacted menu shows both counts separately always on
105 an inline bot query can be sent as plain text always on
106 choose which app opens each service's links: the official app, an alternative like spotifast, the browser, or any program tele → messages → open links in apps
107 shots render at 1x to 4x with sharp text, bubbles, userpics, icons, media and animated emoji, can show your own messages as incoming, and the selection clears when a shot opens with 89
108 export tele settings to a file or as text and import them on any account, system or tele version, with a preview first. people and device settings are optional tele → backup
# what it does where to toggle
59 messages you delete yourself are kept too, not only ones deleted by others with 19
60 the server and updates rows sit right on the tele settings page always on
61 an eyedropper in the photo editor picks the brush color from the image always on
62 edit history opens as its own chat: every version as a full message with its media and time with 18
63 call and voice chat buttons can each be shown, hidden, or ask before calling tele → chats
64 the interface and the profiles and ids pages are split into groups always on
65 more ghost mode: its main menu toggle is optional, sending a message while the online status is hidden sets you offline again right away, and reaction animations play once instead of over and over tele → privacy
66 a copyable id on regular gifts too, not only on collectible ones tele → profiles and ids, off
67 inline bot results go out as your own messages, without via @bot tele → bots, off
68 no rich message prompt when you paste formatted text tele → sending, off
69 set your own background for any chat, or remove its background, only for you, from the chat menu tele → chats → chat backgrounds
70 replying to a message that got deleted meanwhile either drops the reply or quotes the deleted text tele → messages
71 a plain right-click on add account offers the test server always on
72 username aliases: your own @alias for any profile, in any letters, clickable and in autocomplete, only for you. aliases in sent messages become real mentions, a toast says what changed tele → chats → username aliases
73 the jump to mentions and jump to reactions buttons can be hidden tele → chats, off
74 ignored users and ghost chats are picked from a searchable list, like privacy exceptions tele → privacy
75 what's new comes from a local tele chat with its own profile, grouped by settings page, once per account the first time you open it after an update. a button opens the full changelog with 39
76 people who shared their number with you but aren't in your contacts keep their name in the chat header instead of the number tele → profiles and ids, off
77 the emoji, sticker and gif panel and the attach menu open on click only, not on hover tele → chats, off
78 links you paste are rewritten by your own rules, like x.com to fixupx.com. ctrl+z brings the original back tele → messages → link rewrites
79 an editor for link rewrite rules: domains or regex patterns, presets for x, instagram, tiktok, reddit, bluesky and pixiv, and a field to test a link with 78
80 give people a name only you see, from their chat menu. their profile keeps the real one tele → profiles and ids → custom names
81 launch flags that keep tele off the network for one launch, see below always on
82 the calcmula result shows above the input field while you type, like an inline bot. a failed calcmula message goes back into the field once instead of doubling tele → sending, off
83 clear the tele server's saved data, badges included. click a custom verification icon to see what it means: its description, with the icon next to it tele → server → clear cached data
# what it does where to toggle
38 animated userpics can stay still: separately in the chat list and in chats and profiles tele → interface, off, in chats and profiles: tele → chats, off
39 after an update, you get a message with what's new in that tele version, visible only to you. fresh installs skip it tele → updates, on
40 the app calls itself tele everywhere: tray menu, crash window, system menus and more always on
41 the window title (taskbar, alt+tab, system window frame) can be a template too, or follow the title bar label. every template variable takes modifiers like `{weekday short
42 tele settings are grouped into pages like the main settings, with short descriptions and their own search field, and the main settings search finds them too. old links to tele settings open the right page always on
43 service messages like joins and pins show their time too, with seconds with 17
44 media uploads in several chats at once instead of waiting for each other. files in one chat still go one after another tele → sending, off
45 time codes like 1:23 in a reply to a rich message link to its video or audio, the first one if there are several always on
46 messages and captions starting with = are computed with calcmula and sent as the quoted query with = result below it. if it fails, nothing is sent and the text goes back into the field tele → sending, off
47 show peer ids moved from experimental settings into tele tele → profiles and ids
48 the main menu shows the tele build next to the version always on
49 an open in see.tg link on collectible gift cards tele → profiles and ids, off
50 a message that took long to send moves to the bottom of the chat once it's sent, so it's clear when it went out tele → sending, off
51 messages sent while a media is uploading wait for it and go out after it, in order tele → sending, off
52 spotify, steam, discord, zoom, teams, notion, slack and epic links open in their desktop apps when they're installed tele → messages → open links in apps
53 the SUPER MAGA PALANTIR ICE PETER THIEL AI DATA HARVESTER 9000 remover: opened links lose their tracking parameters (utm, fbclid, si, gclid and more). when it would change a link, its right-click menu offers open without cleaning. the same remover works on links in sent messages and captions, the rest of the text stays as it is tele → messages, off
54 text and media spoilers are revealed right away, in chats and the chat list tele → messages, off
55 tele's items sit at the bottom of the message menu: view as tl, then the message id always on
56 right-click a custom emoji in a message to copy its id tele → menus, off
57 dragging while holding a video to speed it up changes the speed instead of moving the media viewer window, and the speedup no longer stops by itself always on
58 reorder and hide items of the message menu, items it doesn't know keep their place tele → menus
# what it does where to toggle
17 message times show seconds, like 14:03:21 tele → messages, off
18 remembers what edited messages looked like while tele runs: right-click an edited message → edit history tele → messages, off
19 messages deleted by others or from your other devices stay in the chat until tele restarts, service messages too, faded as a whole or with a trash icon by the time. each chat gets a page with its kept deleted messages and a clear all button: chat menu → deleted messages tele → messages, off
20 experimental options your system doesn't support are faded completely, title included always on
21 no call button in private chats and profiles tele → chats
22 lowercases the whole interface. messages and names stay as they are tele → interface, off, needs a restart
23 a dc row in profiles: the data center the account or chat lives in tele → profiles and ids, off
24 no ads: no sponsored messages in channels and bots, no video ads, no sponsored search results tele → chats, off
25 links with custom text open right away, without the confirmation tele → messages, off
26 view-once and timed media open without burning, and the sender still sees them unopened. message menu → mark as viewed burns them tele → messages, off
27 view-once and timed media can be screenshotted and recorded tele → privacy, off
28 right-click over a bot button to copy its callback data, inline query, web app url and so on always on
29 the message menu ends with the message id, click it to copy tele → menus, off
33 view as tl in the message menu, and for chats, profiles, members, topics, stickers and sets, custom emoji, gifts, stories and folders: fetches the object from the server and opens it on schema.jppgr.am tele → menus, off
30 hides the all chats folder when you have other folders, the list opens on your first one tele → interface, off
31 jump to the first message, in the chat menu tele → menus, off
32 ghost mode: no read receipts, typing, online status or story views, each switchable, and per chat always or never from the chat menu. optionally reads a chat when you reply, and sends messages as scheduled a few seconds ahead so sending doesn't put you online. the message menu has mark as read up to here, and the side menu has a quick toggle tele → privacy, off
34 no sponsor channel pinned to the chat list when you connect through an mtproxy tele → chats, off
35 lowercase covers tele's own texts and the crash window too with 22
36 a maximized window no longer jitters on a monitor without a taskbar (windows) always on
37 when tele crashed, the next start offers to send the crash report to the tele server instead of telegram. nothing leaves without your click tele → server, on with the server
# what it does where to toggle
13 a copyable gift id at the top of the collectible gift card, which only says a gift is on the ton blockchain while it really is there tele → profiles and ids, off
14 the peer id gets its own profile row instead of trailing the bio, optionally without spaces or in bot api style (-100… for channels) tele → profiles and ids, off (see 47)
15 right-click any tele setting to copy a link that opens it always on
16 ignore users from their userpic menu: their messages fade or disappear, the list lives in settings tele → privacy
# what it does where to toggle
8 business quick replies in groups and channels too. telegram only sends them in private chats, so tele posts the messages as ordinary ones (no bot keyboards, via-bot labels or effects) tele → chats, off
9 checkmarks, custom verification, scam, fake and support marks from the tele server, shown exactly like telegram's own. custom verification icons animate, member lists update as soon as the data arrives, and refresh now fetches it right away tele → server, on
10 the title bar label is a template with live variables, see below tele → interface
11 no account limit (well, 1536) always on
12 checkmarks and custom verification in the account list, the main menu, the settings header and, optionally, next to sender names in messages. badges go in telegram's order everywhere: custom verification, name, emoji status, checkmark, and the premium star stays visible next to checkmarks always on, in messages: tele → chats, off
# what it does where to toggle
1 the title bar shows which tele build you're on always on, see 10
2 the tele section in settings always on
3 hides stories everywhere: no stories bar, no rings around userpics, no stories in profiles tele → privacy, off, needs a restart
4 watch stories without showing up among the viewers. reactions and replies still reveal you tele → privacy, off
5 hovering a bot button shows what it carries: callback data, links, inline queries, web apps and more tele → bots, off
6 self-updates from these releases on windows, linux and macos, signed with ed25519 tele → updates, on
7 the app is called tele: tele.exe, its own taskbar entry, links point here. linux and macos builds are their own app, so they don't clash with an installed telegram always on

title bar template

the default is TELE #{build}. empty hides the label.

  • {build} (the build number, DEV for local builds), {version}
  • {time}, {date}, {weekday}, {day}, {month}, or any qt format like {time:HH:mm:ss} and {date:dd MMM}
  • {name}, {username}, {id}, {accounts}
  • {unread}, {chat}, {chat_unread}, {status}

any variable takes modifiers after |, applied left to right: {weekday|short|lower} is sun, {date:dddd|upper} is SUNDAY.

  • lower, upper: {weekday|lower} is sunday
  • title capitalizes every word, cap only the first letter
  • short is the compact form, wherever it sits in the chain: Sun and Sep for weekday and month, the first name for {name} and for people in {chat}, 7.2 for {version}, 1.2k for counters, … for {status}. other variables stay as they are
  • first, last: the first or last word, {name|first}
  • max:N cuts to N characters with …, {chat|max:20}
  • pad:N pads to N characters, with zeros for numbers: {day|pad:2} is 07
  • k shortens numbers: 1234 is 1.2k, 15000 is 15k, 2500000 is 2.5m
  • default:text shows text when the value is empty or 0, {status|default:online}

[ … ] hides its part when a variable inside is empty or 0, so TELE #{build}[ · {unread} unread] doesn't show "· 0 unread". a default counts as filled. doubled brackets are literal. a | that isn't followed by modifiers stays part of a qt format, and '|' in quotes always does. a variable or modifier with a typo is shown as typed. account and activity variables stay empty while the app is locked with a passcode.

the editor highlights variables in the field and points out mistakes under the preview. below are all the variables as chips: click one to insert it, right-click for its other forms with their current values, hover to see the value now. presets has a few ready templates.

the window title (what the taskbar, alt+tab and the system window frame show) takes the same template, set next to the label. {label} puts the rendered label there, so {label} alone keeps both in sync. empty keeps telegram's own title, and a template that renders to nothing leaves the title blank.

link cleaner

on every site: utm*, mtm_*, pk_*, ga_*, _ga, _gl, gclid, gclsrc, gbraid, wbraid, dclid, gad_source, gad_campaignid, fbclid, fb_action_*, fb_source, fb_ref, action_*_map, msclkid, twclid, ttclid, li_fat_id, epik, yclid, ysclid, _openstat, mc_cid, mc_eid, mc_tc, ml_subscriber*, mkt_tok, igshid, igsh, _hsenc, _hsmi, __hsfp, __hssc, __hstc, hsctatracking, srsltid, s_kwcid, s_cid, oly_*_id, rb_clickid, vero_*, wickedid, _kx, wt_mc, wtrid, hmb_*, itm_*, otm_*, cmpid, os_ehash, __twitter_impression, tracking_source, echobox, spm, _branch_match_id, _branch_referrer, si. fragments like #utm_source=… go too.

per site, on top of that: youtube (feature, pp, kw), spotify (context, nd, dl_branch), twitter / x and fx/vx mirrors (s, t, src, ref_src, ref_url, cn), threads (xmt, slof), tiktok (_r, _t, is_from_webapp, sender_device, share_* and more), facebook (mibextid, __tn__, __cft__, ref*, notif_* and more), reddit (share_id, ref*, correlation_id, rdt), amazon (pd_rd_*, qid, ref_, tag, linkCode, /ref=… in the path and more), aliexpress (aff_*, algo_*, pvid, scm* and more), vk (from, ref, ref_domain), yandex (from, clid, redircnt), google search (ved, ei, sa, usg, oq, aqs, gs_* and more), google docs / drive (usp), linkedin (trk*, refId, lipi and more), ebay (_trk*, mk*, campid and more), medium (source), github (email_token, email_source), steam (snr), netflix (trackId, tctx), twitch (tt_medium, tt_content), imdb (ref_, pf_rd_*), bing, msn, apple (itsct, itscg), pinterest, hh.ru, ozon. t.me links are never touched.

launch flags

start tele with any of these to keep it off the network on its own for that launch. telegram's own connection works as usual, and your settings stay as they are.

  • -noteleserver: nothing goes to the tele server: no checkmark or other mark updates (the saved ones still show) and no crash reports.
  • -noteleupdate: no update checks, no downloads, no what's new.
  • -teleoffline: both of the above, and calcmula is off too.

the flags stay on when tele restarts itself, like after an update. on windows, add them to a shortcut after tele.exe; on linux, ./tele -teleoffline; on macos, open -a tele --args -teleoffline. a shortcut with -noteleserver keeps even the very first launch away from the tele server. to turn the server off for good, empty its field in settings.

tele server

tele can pull extra account data, like checkmarks, custom verification, scam / fake marks and support marks, from an optional server (settings → tele → server). it only ever downloads one public list and never tells the server which accounts you look at. the list is hashed, so it can't just be read off as a list of accounts. tele checks it every 10 minutes, and "refresh now" fetches it right away. leave the field empty to turn it off. "clear cached data" drops the list tele saved, so the marks disappear until the next fetch.

the same server takes crash reports. after a crash, tele offers to send the report: a short text with the version, platform and the crash reason, plus a minidump of the crashed process. you can look at it first and untick your username. with the server field empty, nothing is offered.

running your own server

any server that serves the same format works: point settings → tele → server at it. the list never contains account ids, only keys that can't be turned back into ids without trying them one by one.

tele asks GET <server>/v1/badges and expects json like this:

{
  "salt": "AAECAwQFBgcICQoLDA0ODw==",
  "argon2": { "memory": 8192, "passes": 1, "lanes": 1 },
  "peers": {
    "iguxbtP_SnLvK69aBff2OQ": { "checkmark": true, "icon": "5368324170671202286", "description": "official" },
    "w5Zbi-HfwlqkJ6S4wjwqcw": { "scam": true }
  }
}
  • salt is 8 to 64 random bytes in standard base64 with padding.
  • argon2 are the argon2id costs: memory in KiB (1024 to 65536), passes (1 to 8), lanes (1 to 8), and memory × passes at most 65536. the official server uses 8192 / 1 / 1.
  • each key in peers is base64url without padding of argon2id(password, salt) with those costs, a 16-byte output, version 0x13, no secret and no associated data.
  • the password is the utf-8 string <scope>:<id>:
    • scope is prod, or test for accounts on telegram's test servers;
    • id is the bot api style id: users as is (777000), channels and supergroups as -100 followed by the channel id (-1001234567890). basic groups can't have entries.
  • every field of an entry is optional: checkmark, scam, fake and support are booleans (false by default), icon is a custom emoji document id as a decimal string, description is plain text shown under the verification in the profile, and supportText (1 to 64 characters, users only) replaces the word "support" under the name of a support account. tele ignores fields it doesn't know, but rejects the whole list when a known field has the wrong type or length.

with the salt above, prod:777000 gives iguxbtP_SnLvK69aBff2OQ and prod:-1001234567890 gives w5Zbi-HfwlqkJ6S4wjwqcw. check your implementation against these two before anything else. in python:

from argon2.low_level import hash_secret_raw, Type
import base64

raw = hash_secret_raw(b"prod:777000", bytes(range(16)), time_cost=1, memory_cost=8192,
                      parallelism=1, hash_len=16, type=Type.ID, version=0x13)
print(base64.urlsafe_b64encode(raw).rstrip(b"=").decode())  # iguxbtP_SnLvK69aBff2OQ

the list can also give accounts extra usernames. they're public anyway, so they come as plain text, in an optional usernames object next to peers:

"usernames": {
  "tele": { "username": "teleAppUpdates", "position": 0 },
  "teleNews": { "username": "teleAppUpdates" }
}
  • each key is the extra username, 2 to 32 latin letters, digits and underscores. username is the real public username of the account that gets it, 4 to 32 of them. both start with a letter and are compared ignoring case.
  • position is optional: the place of the extra username among the account's usernames, counting from 0, so 0 makes it the main one in the profile. without it, the username goes after the real ones. a position past the end puts it last.
  • tele skips a bad entry on its own and keeps the rest: a wrong name, an extra username equal to its account's username, the same key twice in different case, or a position that isn't a whole number from 0 to 1000. only the first 1000 good entries count. usernames never makes tele reject the list, and salt, argon2 and peers are still required (peers can be empty).
  • they only apply to accounts on telegram's main servers, not the test ones.

with settings → tele → usernames from the server on (the default), the profile of @teleAppUpdates shows @tele, and @tele in messages, t.me/tele and tg://resolve?domain=tele open @teleAppUpdates, even when someone really owns @tele. the menu on such a link can still open the real one. your own aliases come first. @tele in a message you send becomes @teleAppUpdates, so other apps see the real username.

to keep it that way:

  • serve the keys sorted, so their order says nothing about the accounts behind them.
  • change the salt from time to time (the official server derives a new one every month), so lists from different times can't be compared key by key. every key has to be recomputed with the new salt.
  • keep the costs within the limits above: tele computes one key for every account it shows, and rejects a list that asks for more.

tele also rejects a list over 4 MiB or with more than 100000 entries, and then keeps using the last good one. it sends If-None-Match with "<hex sha256 of the body it has>", so answering 304 when that matches the current body saves traffic, and a server can't tag clients with its own etags.

crash reports are optional. tele speaks the same protocol as telegram's own crash server, at <server>/v1/crash.php:

  • GET ?act=query_report&apiid=…&version=…&dmp=0|1&platform=… answers Report as plain text when the server wants the report. anything else makes tele say thanks and send nothing.
  • POST ?act=report is multipart/form-data with platform (like Windows64Bit, Linux, MacOS), version (like 7002009), report (the report text) and, when there is one, dump (a zip with one .dmp minidump, under 20 MiB). answer Done.
  • answer 404 to both if you don't collect crashes.

contributing

bug fixes, conflict fixes and new features are welcome. for a feature, open an issue first. CONTRIBUTING.md walks through the whole cycle: getting the patched sources with tele.py, building, testing, exporting patches and opening a pull request.

About

a telegram desktop fork, kept as a queue of patches on top of upstream releases and built automatically

Topics

Resources

Contributing

Stars

12 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages