Compare commits

..

340 Commits

Author SHA1 Message Date
John Preston
ffdcda5a90 Version 2.7.2.
- Offer real goods and services for sale in any group,
channel or bot – Telegram doesn't charge a commission.
- Pay for goods securely using one of the 8 integrated
payment providers – Telegram doesn't collect your payment info.
- See how this works in our @TestStore.
- Schedule voice chats to let participants know about them in advance.
- View a countdown to the voice chat and get notified when it starts.
- Try two new, fully-featured versions of Telegram Web – both
supporting animated stickers, dark mode, chat folders and more:
https://webk.telegram.org/ and https://webz.telegram.org/.
2021-04-26 16:51:32 +04:00
John Preston
06292e7442 Fix crash and glitch in video-in-PiP preserve. 2021-04-26 16:51:32 +04:00
John Preston
5bb73d8d3d Move recent emoji and variants to common settings.
Fixes #16163, fixes #4018, partially fixes #10123.
2021-04-26 10:51:10 +04:00
John Preston
68e35b232d Fix updating langs in payments form buttons. 2021-04-26 10:51:10 +04:00
John Preston
2843500ce3 Add url with the Focus Assist API information.
Thanks https://www.withinrafael.com/2019/09/19/
determine-if-your-app-is-in-a-focus-assist-profiles-priority-list/
2021-04-26 10:51:10 +04:00
John Preston
2730ab1596 Query Focus Assist state on Windows. 2021-04-23 08:04:43 +04:00
Luis Alfredo Figueroa Bracamontes
3a28be1e16 Update README.md to split VS2019 32 and 64 bits
Since there are different methods to build for VS for 32 and 64 bits, I think it'd be good to split the label
2021-04-22 10:12:58 +03:00
John Preston
03214ab522 Add IsOverlapped implementation for macOS to lib_ui. 2021-04-20 16:47:58 +04:00
Ilya Fedin
6b1bc1e845 Check if the window is not overlapped when is not active 2021-04-20 15:44:09 +03:00
John Preston
1d64b53cd0 Improve black-and-white QR code border. 2021-04-20 16:42:43 +04:00
John Preston
c360bb9da4 Use LOG/DEBUG_LOG from lib_base. 2021-04-20 16:42:43 +04:00
John Preston
08e170a068 Backport Qt deadlock fix in patches. 2021-04-19 11:27:24 +04:00
John Preston
42d40a6f8f Remove 'Restrict user' button in gigagroups. 2021-04-19 11:26:04 +04:00
John Preston
d93d47f2cf Always use black-over-white login QR code.
Some android devices don't read light-on-dark QRs.

Fixes #10077. Fixes #16152.
2021-04-19 11:26:04 +04:00
John Preston
25470cde3c Fix unread badge styles on palette changes. 2021-04-19 11:26:04 +04:00
John Preston
c242a61e8c Fix money input field limit without decimal separator. 2021-04-19 11:26:04 +04:00
John Preston
286cb74620 Make WebLoadManager live on the main thread only. 2021-04-19 11:26:04 +04:00
Loïc Molinari
336405b3c7 Fix voice record button infinite animation
Enabling animations triggers an animation of the voice record button
that keeps firing uselessly at ~120 calls per second until the button
is manually toggled. The animation callback cannot stop itself since
it expects the button to be visible.

This commit fixes the issue by preventing spawning the animation if
the widget is hidden.
2021-04-15 16:22:29 +03:00
Ilya Fedin
2eda5bb2d8 Add webkit dependency to snap 2021-04-15 16:20:59 +03:00
Loïc Molinari
06618a5253 Use fine grained session timers
The check of sent requests and containers is done unconditionally
every second even though the request timeout is 10 seconds and the
container timeout is 600 seconds. This commit uses fine grained timers
instead in order to avoid useless system wake-up events.

The check of sent requests is now scheduled on demand when a new
request is queued. Then the callback, while parsing queued requests,
computes the delta to the closest expiring request and automatically
schedules the next check if necessary.

Given the high value of the container timeout, its callback is called
repeatedly every 600 seconds, unless it computes a lower delta for an
expiring container using the same logic as for the requests.
2021-04-15 16:20:42 +03:00
aburmagin
de70df0b6b added CLion-generated files to .gitignore 2021-04-14 08:50:32 +03:00
John Preston
cf6dbfaf55 Fix a crash in case of corrupt local data. 2021-04-14 09:45:51 +04:00
John Preston
6cbee72b8a Closed alpha version 2.7.1.3. 2021-04-13 19:47:28 +04:00
John Preston
0a0803de6f Fix couple of crashes. 2021-04-13 19:46:42 +04:00
John Preston
bee6a1dc06 Second click on Tips button resets tips to $0. 2021-04-13 19:04:27 +04:00
John Preston
155fcb6dde Fix build on Linux with different options. 2021-04-13 19:02:30 +04:00
John Preston
3e5e0cb9df Fix crash on right click in ConfirmBox with link. 2021-04-13 19:02:17 +04:00
John Preston
be74a391ba Show floor()-ed days count till voice chat start. 2021-04-13 18:27:38 +04:00
John Preston
d71b6effd6 Return request for code resend on auth. 2021-04-13 17:54:12 +04:00
John Preston
5ff70315cb Fix crash in GTK + Qt initialization. 2021-04-13 17:30:28 +04:00
John Preston
04c0d79ccc Add payment button icon to the corner. 2021-04-13 17:21:24 +04:00
John Preston
34c5ce16d0 Fix contract violation in shutdown with webview. 2021-04-13 16:52:40 +04:00
John Preston
e52f947f98 Improve webview progress style. 2021-04-13 16:38:38 +04:00
John Preston
40e46e8480 Hide webview progress instantly. 2021-04-13 15:37:25 +04:00
Ilya Fedin
c87802ce65 Move GTK initialization before Qt initialization
To ensure Qt doesn't load GTK earlier than us and gdk_set_allowed_backends respected
2021-04-13 14:03:00 +03:00
John Preston
73c63cb2c7 Hide payments webview progress when destroying. 2021-04-13 14:05:31 +04:00
John Preston
0ead0879d7 Support blocking progress in payment panel. 2021-04-12 19:24:36 +04:00
John Preston
52b5c4cbe0 Fix animated stickers with BOM.
Regression was introduced in 98afc99a8f (RapidJSON update in rlottie).
2021-04-12 17:48:16 +04:00
John Preston
a9422111a2 Fix crash in leaving Recent Actions with GIFs. 2021-04-12 17:46:46 +04:00
John Preston
e5ac7a1416 Fix creating a scheduled voice chat. 2021-04-12 15:36:19 +04:00
Alexander Bushnev
99501d844d Remember that media view was switched to PIP and open it as PIP again.
Very useful, especially on large monitors.
Since the permanent opening of the video in full screen interferes and hide other applications.
This functionality allows remembering (in the current session) that the window has been switched to a PIP mode and will open a new video directly in the PIP mode.
2021-04-12 12:03:48 +03:00
Loïc Molinari
46ee5598f5 Remove dangling timer in MTP Session
Commit bdc7f4114f got rid of
_timeouter's callback without removing the timer that still fires
every second.
2021-04-12 12:03:15 +03:00
John Preston
aa843ee978 Update lib_ui. 2021-04-12 13:02:53 +04:00
Ilya Fedin
ad0c93cbb1 Take shadow into account when saving/restoring window geometry 2021-04-12 11:55:30 +03:00
John Preston
35ff621b5b Show toast on successfull payment. 2021-04-12 12:50:31 +04:00
John Preston
a2d2c8a208 Update tgcalls library. 2021-04-12 12:50:14 +04:00
John Preston
0e1a445614 Fix serializing peers. 2021-04-12 10:48:17 +04:00
John Preston
13d0d15a50 Closed alpha version 2.7.1.2. 2021-04-12 10:48:17 +04:00
John Preston
16f1875fdc Fix crash in reading StorageFileLocation. 2021-04-12 10:48:17 +04:00
John Preston
4625e7613b Use data_peer_id in export. 2021-04-12 10:48:17 +04:00
John Preston
a100048cce Fix build on macOS and Linux. 2021-04-12 10:48:17 +04:00
John Preston
188070d03f Closed alpha version 2.7.1.1. 2021-04-12 10:48:17 +04:00
23rd
23996d14d3 Fixed display of chat buttons on main touchbar after audio touchbar.
Fixed #10361.
2021-04-12 10:48:17 +04:00
23rd
07c65dfd74 Fixed song covers for voice chat records. 2021-04-12 10:48:17 +04:00
23rd
61741b53c3 Fixed display of rescheduling selected messages in other sections. 2021-04-12 10:48:16 +04:00
John Preston
ae74c8a6b8 Show voice chat start time in service message. 2021-04-12 10:48:16 +04:00
John Preston
4ecd1049b2 Allow scheduling voice chats for up to 7 days. 2021-04-12 10:48:16 +04:00
John Preston
71c4cc9623 Pass theme params to payments.GetPaymentForm. 2021-04-12 10:48:16 +04:00
John Preston
d41bd1483e Queue skipped self updates in voice chats. 2021-04-12 10:48:16 +04:00
John Preston
0e47c6b415 Show 'Late by' state and glow in ForceMuted state. 2021-04-12 10:48:16 +04:00
John Preston
4d91ab7079 Update lottie icons in voice chats. 2021-04-12 10:48:16 +04:00
John Preston
dc2192d5ca Invoke click handler from a closed ConfirmBox.
Fixes #10597.
2021-04-09 15:05:00 +04:00
John Preston
1342077dcb Use 48 bit [User/Chat/Channel]Id, 56 bit PeerId. 2021-04-09 15:05:00 +04:00
John Preston
61d0cc38b0 Add native card input support through smartglocal. 2021-04-08 12:49:28 +04:00
John Preston
79f7aa703a Allow clearing saved payments information. 2021-04-07 15:43:32 +04:00
John Preston
65dd9b82c0 Share instead of Settings for scheduled voice chats. 2021-04-07 14:56:53 +04:00
John Preston
96bc4858c1 Add schedule voice chat link in ConfirmBox. 2021-04-07 11:21:59 +04:00
John Preston
27fc61c676 Add confirm for starting scheduled voice chat early. 2021-04-06 20:09:52 +04:00
John Preston
8c7217ad56 Fix build on macOS. 2021-04-06 18:53:03 +04:00
John Preston
bd42c68978 Fix members list after schedule voice chat start. 2021-04-06 18:41:16 +04:00
John Preston
c2900db061 Allow change join_as in scheduled call. 2021-04-06 18:41:16 +04:00
John Preston
d7e90fec1a Add a nice countdown to scheduled voice chat panel. 2021-04-06 18:41:16 +04:00
John Preston
66e7f05df1 Improve scheduled voice chat top bar design. 2021-04-06 18:41:16 +04:00
John Preston
088fda4ed8 Correctly track mute button scheduled state. 2021-04-06 18:41:16 +04:00
John Preston
15d17c8b0e Add creating of a scheduled group call. 2021-04-06 18:41:16 +04:00
John Preston
e6587f2556 Add limited webview support on Linux. 2021-04-06 18:41:16 +04:00
John Preston
d40687adb8 Remove testing code. 2021-04-06 18:41:16 +04:00
John Preston
ee098d00ad Add better error reporting to payments. 2021-04-06 18:41:16 +04:00
John Preston
e106bd143e Add a warning once per bot on payment. 2021-04-06 18:41:16 +04:00
John Preston
62684ab9bb Warn before closing payment panel. 2021-04-06 18:41:16 +04:00
John Preston
69b70cda54 Explain registration from mobiles only. 2021-04-06 18:41:16 +04:00
John Preston
b6c86fd298 Add nice tips buttons. 2021-04-06 18:41:16 +04:00
John Preston
d55d7f37d7 Close payments panel by escape. 2021-04-06 18:41:16 +04:00
John Preston
b1c122a260 Add ' (Test)' to checkout panel titles. 2021-04-06 18:41:16 +04:00
John Preston
bdffdea358 Always jump to next field in payments. 2021-04-06 18:41:16 +04:00
John Preston
491ec2db7f Always show footer in webview in payments. 2021-04-06 18:41:16 +04:00
John Preston
cd4a9d7c16 Show 'phone/email passed to provider' in payments. 2021-04-06 18:41:16 +04:00
John Preston
7cbe158d00 Update API scheme. 2021-04-06 18:41:16 +04:00
John Preston
1cc1f380d0 Implement a nice money input field. 2021-04-06 18:41:16 +04:00
John Preston
0188719d04 Fix payments with zero tips. 2021-04-06 18:41:16 +04:00
John Preston
e6ba6050e7 Update button on paid invoices to 'Receipt'. 2021-04-06 18:41:16 +04:00
John Preston
889e0dc035 Fix build for macOS / Linux. 2021-04-06 18:41:16 +04:00
John Preston
663db64688 Allow saving and using saved credentials. 2021-04-06 18:41:16 +04:00
John Preston
2e58993181 Use title/description from paymentReceipt. 2021-04-06 18:41:16 +04:00
John Preston
f09a468a7c Improve design of payment bottom buttons. 2021-04-06 18:41:16 +04:00
John Preston
b08d9fe0b8 Reactivate window on payment close. 2021-04-06 18:41:16 +04:00
John Preston
619f70ab22 Improve design of shipping option selection. 2021-04-06 18:41:16 +04:00
John Preston
21b502c754 Format money amount same way as server does. 2021-04-06 18:41:16 +04:00
John Preston
8cac76931e Support adding tips in payments. 2021-04-06 18:41:15 +04:00
John Preston
00c915e58d Add support for inline invoices. 2021-04-06 18:41:15 +04:00
John Preston
8889329415 Support sending live location in inline bot results. 2021-04-06 18:41:15 +04:00
John Preston
3ec3f6484f Update API scheme to layer 128. 2021-04-06 18:41:15 +04:00
John Preston
c7a1771dec Simple receipt viewing. 2021-04-06 18:41:15 +04:00
John Preston
320adcd389 Fix showing comments from the beginning. 2021-04-06 18:41:15 +04:00
John Preston
1050447eed Add phone format and validation in payments. 2021-04-06 18:41:15 +04:00
John Preston
0af6c4b0b6 Add local validation for card information. 2021-04-06 18:41:15 +04:00
John Preston
e077163322 Add nice country choosing in payments. 2021-04-06 18:41:15 +04:00
John Preston
47fdef1e38 Improve checkout information / card page design. 2021-04-06 18:41:15 +04:00
John Preston
fafea73ea7 Improve checkout main page design. 2021-04-06 18:41:15 +04:00
John Preston
56031a6402 Handle native / non-native payment methods (same way). 2021-04-06 18:41:15 +04:00
John Preston
5e4bc200c2 Support entering card details natively. 2021-04-06 18:41:15 +04:00
John Preston
5bc6e6533f Fix jumping of Media Viewer in some DEs. 2021-04-06 18:41:15 +04:00
John Preston
76b4e18518 Port required parts of Stripe SDK to lib_stripe. 2021-04-06 18:41:15 +04:00
John Preston
994dbf9eb5 Validate saved information on payment form open. 2021-04-06 18:41:15 +04:00
John Preston
212497413c Show some payment errors, focus fields. 2021-04-06 18:41:15 +04:00
John Preston
0d44736575 First full-featured version of payments, no design. 2021-04-06 18:41:15 +04:00
John Preston
4c707bff29 Start proper payments processing. 2021-04-06 18:41:15 +04:00
John Preston
25bbde2739 Use navigation cancel in Webview. 2021-04-06 18:36:09 +04:00
John Preston
c74e240d30 Update lib_webview. 2021-04-06 18:36:09 +04:00
John Preston
7b277aa770 Start Linux support. 2021-04-06 18:36:09 +04:00
John Preston
f93527442d Use lib_webview implementation on macOS. 2021-04-06 18:36:09 +04:00
John Preston
35610da750 Use lib_webview implementation on Windows. 2021-04-06 18:36:09 +04:00
John Preston
21228783da Fix webview on macOS. 2021-04-06 18:36:09 +04:00
John Preston
b323e5ffcf 3DSecure in Proof-Of-Concept payments. 2021-04-06 18:36:09 +04:00
John Preston
7c979144fc Proof-Of-Concept simplest invoice payment. 2021-04-06 18:36:09 +04:00
John Preston
fd85efa9ba Link Telegram with lib_webview. 2021-04-06 18:36:09 +04:00
John Preston
22da48d231 Add webview / lib_webview submodules. 2021-04-06 18:36:09 +04:00
Ilya Fedin
3343880ed0 Watch for network availability changes 2021-04-06 16:40:29 +03:00
Ilya Fedin
df73bda1ff Update lib_ui 2021-04-05 10:19:24 +03:00
Ilya Fedin
75a782cced Workaround force setting of WM_TRANSIENT_HINT in Qt's xcb backend 2021-04-05 10:19:24 +03:00
Ilya Fedin
0e126e2550 More advanced logging about... logging 2021-04-05 09:22:04 +03:00
Ilya Fedin
cffb615a4d Fix build 2021-04-05 09:22:04 +03:00
Ilya Fedin
7ab3be3631 Handle any audio type with MPRIS 2021-04-05 09:08:33 +03:00
Ilya Fedin
591488c497 Close players instead of quitting the app 2021-04-05 09:08:33 +03:00
Ilya Fedin
ae54c8af6a Add support for setting cover with MPRIS 2021-04-05 09:08:33 +03:00
Ilya Fedin
30c86523ff Remove redudant indenattion level in MPRIS XML 2021-04-05 09:08:33 +03:00
Ilya Fedin
9a6e571154 Move XDP file dialog to glibmm mime type & regex methods 2021-04-05 08:30:04 +03:00
Ilya Fedin
13a497cf5d Update lib_base 2021-04-05 08:25:47 +03:00
Ilya Fedin
6463890b11 Workaround snap's activation restriction 2021-04-05 08:25:47 +03:00
Ilya Fedin
073b5b106c Get rid of modal parent hack
It was introduced to workaround the absence of size hints propagating in Qt 5.12 Wayland backend, there's no need in it anymore
2021-04-05 08:03:46 +03:00
Ilya Fedin
0cd8cc67c5 Scale window icon manually when getting from icon theme 2021-04-05 08:02:50 +03:00
Nicholas Guriev
f528a240d9 Rely on QT_STRINGIFY instead of custom macro 2021-04-05 07:59:18 +03:00
GitHub Action
a814c3f428 Update User-Agent for DNS to Chrome 89.0.4389.90. 2021-04-02 20:49:20 +03:00
Ilya Fedin
81d052adfc Add a way to get dark mode state on KDE 2021-04-02 20:30:47 +03:00
Ilya Fedin
822c1cafd2 Fix a space on end of a line in linux_mpris_support 2021-04-02 20:30:47 +03:00
Ilya Fedin
c08a148baf Fix build on 32-bit systems 2021-03-23 18:21:07 +03:00
John Preston
a38a94ed9c Update submodules. 2021-03-22 22:38:22 +04:00
John Preston
4d579f873c Remove tested 110% scale. 2021-03-22 19:52:51 +04:00
John Preston
56c8327746 Fix emoji picker button in boxes in non-default scale. 2021-03-22 19:41:13 +04:00
John Preston
0e6d4291a2 Fix close window button paint in theme preview. 2021-03-22 19:40:12 +04:00
John Preston
8ca622d077 Remove 100% from voice chat 'speaking' status. 2021-03-22 18:55:07 +04:00
John Preston
4d24f28fd0 By voicechat link open the channel as well. 2021-03-22 17:24:53 +04:00
John Preston
2b3469ef22 Remove CAPS in calls / voice chats top bar. 2021-03-22 16:44:00 +04:00
John Preston
03a868a6e3 Allow skipping stuck files in data export.
Fixes #6423.
2021-03-22 16:32:40 +04:00
Ilya Fedin
12db51fe75 Avoid removing portal platformtheme plugin in snap 2021-03-22 07:57:18 +03:00
Ilya Fedin
ce5579e8f9 Unify gtk/xdp file dialog getters 2021-03-22 07:57:18 +03:00
Ilya Fedin
a16b7fbb83 Fix path to executable in ComputeExternalUpdater 2021-03-21 09:04:43 +03:00
Ilya Fedin
9f6f7f7c9b Fix build without dbus 2021-03-21 08:59:19 +03:00
John Preston
a82d1e863e Version 2.7.1: Fix channels ban in admin log. 2021-03-20 18:19:31 +04:00
John Preston
26d97a3636 Version 2.7.1.
- Fix editing 'Manage Voice Chats' rights for channel admins.
- Fix verification check display in voice chat participants list.
- Allow removing and blocking channels from voice chats.
2021-03-20 16:23:41 +04:00
John Preston
7b8e421996 Allow markup in some voice chat toasts. 2021-03-20 16:23:41 +04:00
John Preston
2bc2a0e459 Fix possible integer overflow. 2021-03-20 16:03:58 +04:00
John Preston
7cb4b4f8ab Don't try to use WebRTC built-in audio backends. 2021-03-20 15:43:35 +04:00
John Preston
b439ecce16 Allow all toasts to be multiline in voice chats. 2021-03-20 15:43:35 +04:00
John Preston
a33a4c0589 Fix maximize/restore voice chat title bar button. 2021-03-20 15:43:35 +04:00
John Preston
5278e2201f Make red 'Remove' in voice chat participant menu. 2021-03-20 15:43:35 +04:00
John Preston
3bd6b2268f Allow blocking channels in voice chats. 2021-03-20 15:43:35 +04:00
John Preston
a0a13c3b86 Update API scheme to layer 126. 2021-03-20 15:43:35 +04:00
John Preston
0052c7938f Fix verified icon in voice chat participants list. 2021-03-20 15:43:35 +04:00
John Preston
a14db3e492 Allow editing 'Manage Voice Chats' admin right in channels. 2021-03-20 15:43:35 +04:00
Ilya Fedin
7979b3b6c8 Fix devtoolset version in linux action 2021-03-20 14:33:02 +03:00
Ilya Fedin
3f25e92afd Add build options for libtgvoip backends
libtgvoip has options to disbale some backends, but they never were exposed via tdesktop's cmake

Since libtgvoip autoconf build system doesn't work anymore, it's worth to have these options in tdesktop's cmake.
2021-03-20 14:33:02 +03:00
Ilya Fedin
3d1cddaca5 Add a way to change default handler in snap 2021-03-20 14:20:09 +03:00
John Preston
eeecc42c25 Version 2.7.
- Start limitless Voice Chats in Groups and Channels.
- Host discussions that can be listened to
by millions of people simultaneously.
- Record voice chats to share or publish in Channels later.
- See that a chat is being recorded
from the red dot next to its title.
- See user bio texts right from the list of participants.
- Raise your hand to show admins you want to speak.
- Create separate Voice Chat Invite Links for listeners or speakers.
- Change the title of your Voice Chat
to give people an idea of the current topic.
- Join Voice Chats as one of your Channels
to hide your personal account.
2021-03-19 14:15:26 +04:00
John Preston
e22ecafc1d Add confirmation on create / anonymous admin join. 2021-03-19 14:10:02 +04:00
John Preston
ba41da7b28 Fix discarded group call handle. 2021-03-19 00:57:16 +04:00
John Preston
9cfbccf9e7 Beta version 2.6.8.
- Fix connecting and getting allowed to speak on voice chats.
- MPRIS support on Linux.
2021-03-18 22:56:42 +04:00
John Preston
2b6f50e114 Fix joining / unmuting. 2021-03-18 22:56:42 +04:00
Ilya Fedin
d2f57b72c3 Add mpris permission for snap 2021-03-18 21:55:06 +03:00
Ilya Fedin
85ac983a27 Add MPRIS support 2021-03-18 21:55:06 +03:00
John Preston
ac397e6e19 Beta version 2.6.7.
- Improve voice chat participants list updating.
2021-03-18 18:05:43 +04:00
John Preston
38e15c9bdb Fix saving legacy chat admins without migration.
Fixes #10558.
2021-03-18 17:27:33 +04:00
John Preston
00d65fa978 Request one participants slice on voice chat reload. 2021-03-18 16:58:05 +04:00
John Preston
3fea9cca08 Subscribe to channel updates in voice chat. 2021-03-18 15:54:28 +04:00
John Preston
b390e0766b Apply all queued updates on reload. 2021-03-18 15:30:58 +04:00
John Preston
2f75e6bbe2 Add some logging for voice chat updates. 2021-03-18 15:22:55 +04:00
Ilya Fedin
decbbb9a73 Check for openal fork updates in Dockerfile 2021-03-18 07:51:57 +03:00
Ilya Fedin
b4b80822c8 Set glib's application name and prgname 2021-03-18 07:51:57 +03:00
John Preston
bc82cdc3b3 Call dump_syms and strip outside of docker. 2021-03-18 02:33:29 +04:00
John Preston
ebc67d25f0 Migrate docker build to GCC 9. 2021-03-18 00:30:12 +04:00
John Preston
348b4d54ba Revert "Workaround build issues on GCC."
This reverts commit 3defb06783.
2021-03-18 00:30:12 +04:00
John Preston
6f86ce595b Beta version 2.6.6.
- Fix joining popular voice chats.
2021-03-18 00:26:53 +04:00
John Preston
8c53a3c19e Don't skip updateGroupCallParticipants while in getDifference. 2021-03-18 00:25:53 +04:00
John Preston
67623072d6 Fix joining a voice chat. 2021-03-18 00:24:36 +04:00
John Preston
1291f1c80d Beta version 2.6.5.
- Improvements and fixes in new voice chat features.
2021-03-17 21:16:55 +04:00
John Preston
0684db9bd8 Improve participants sorting in voice chats. 2021-03-17 20:37:55 +04:00
John Preston
db7b61a77b Rewrite voice chat members list management. 2021-03-17 20:37:55 +04:00
John Preston
d392633b90 Send speaking typings in channels. 2021-03-17 20:37:55 +04:00
John Preston
76e08af26a Apply updateGroupCallParticipants before updateGroupCall. 2021-03-17 20:37:55 +04:00
John Preston
b23f16e6e4 Don't show 'allowed to speak' on first join. 2021-03-17 20:37:54 +04:00
23rd
23156d523c Fixed Github CI Windows build. 2021-03-17 18:59:20 +03:00
Ilya Fedin
04b0e2e9e6 Update submodules 2021-03-17 18:58:02 +03:00
Ilya Fedin
ace5740125 Use QProcess::startDetached for xdg-open
Since it may running continously
2021-03-17 15:39:26 +03:00
John Preston
bc67b79023 Beta version 2.6.4: 110% UI scale on macOS Retina. 2021-03-17 00:07:08 +04:00
John Preston
528c98af67 Beta version 2.6.4.
- Fix freeze in voice chats.
2021-03-17 00:02:05 +04:00
John Preston
311a2f2753 Fix freeze in voice chats. 2021-03-16 23:54:58 +04:00
John Preston
3defb06783 Workaround build issues on GCC. 2021-03-16 22:26:58 +04:00
John Preston
5708b5e849 Fix confirmation when joining by link. 2021-03-16 21:06:36 +04:00
John Preston
1db1328a91 Beta version 2.6.3.
- Fix audio device selection in voice chats.
- Fix blinking self profile photo
in case the profile photo privacy is used.
- Fix voice chat admin menu on macOS.
2021-03-16 19:13:15 +04:00
John Preston
2e9d6d73c3 Fix invalid 'You can speak' notification. 2021-03-16 19:09:23 +04:00
John Preston
38dd5ab837 Fix 'join as' userpic button display. 2021-03-16 18:58:10 +04:00
John Preston
83ab670c50 Remove 'wants to speak' status in three seconds. 2021-03-16 18:51:38 +04:00
John Preston
5621e41529 Limit voice chat title to 40 characters. 2021-03-16 18:51:11 +04:00
John Preston
056cab6268 Don't apply private userpic 'min' updates. 2021-03-16 18:15:19 +04:00
John Preston
61d0d240aa Add 'rejoin as' and 'change title' toast notifications. 2021-03-16 18:13:51 +04:00
John Preston
33ae4c2802 Improve layout of voice chat channel choosing. 2021-03-16 17:16:56 +04:00
John Preston
2c806b11d7 Always join voice chats by link with confirmation. 2021-03-16 17:16:01 +04:00
John Preston
199434c7a2 Add recording mark animation. 2021-03-16 14:48:12 +04:00
John Preston
c65c554d88 Don't ask joinAs for voice chats each time. 2021-03-16 14:33:11 +04:00
John Preston
5d16359a5a Fix voice chat three-dot menu on macOS. 2021-03-16 13:50:40 +04:00
John Preston
fd9ad04d15 Vazir Without-Latin instead of Without-Latin-UI.
Fixes #10536.
2021-03-16 13:29:46 +04:00
Ilya Fedin
0c8febce9c Avoid allocations for case-insensetive compare 2021-03-16 12:20:48 +03:00
John Preston
4659cc50f2 Allow inviting members in channel voice chats. 2021-03-15 22:40:59 +04:00
John Preston
2fddeb478b Fix long texts in invite link error toasts. 2021-03-15 20:49:38 +04:00
Ilya Fedin
4ffe1d3acc Use base::flat_map for pointer keys 2021-03-15 19:49:06 +03:00
Ilya Fedin
cdf0512515 Remove unused variable in mainwidget 2021-03-15 19:49:06 +03:00
Ilya Fedin
971e188063 Replace remaining QFileInfo::exists 2021-03-15 19:49:06 +03:00
John Preston
a909c1a813 Make default UI scale 120% on macOS Retina. 2021-03-15 20:33:41 +04:00
John Preston
4fc2b1f1a3 Append x64 to app_version on Windows. 2021-03-15 20:14:39 +04:00
John Preston
fb04f33ae8 Fix long voice chat title elision on macOS. 2021-03-15 19:34:58 +04:00
John Preston
b2c87e7a73 Fix three-dot toggle in voice chats. 2021-03-15 19:19:29 +04:00
John Preston
86a33ceea1 Fix audio device selection in voice chats. 2021-03-15 19:00:58 +04:00
John Preston
a5d8d7a550 Add some validation for GroupThumbs. 2021-03-15 19:00:32 +04:00
Ilya Fedin
11723aedff Get rid of empty QStringLiterals 2021-03-15 17:19:59 +03:00
Ilya Fedin
fe5de8f009 Fix non-working UniqueConnection in gtk file dialog 2021-03-15 17:19:44 +03:00
Ilya Fedin
6b68d001ae Get rid of deprecated ranges::action 2021-03-15 11:41:29 +03:00
Ilya Fedin
ae0b9141dd Trying to get rid of unused variables... 2021-03-15 11:40:44 +03:00
Ilya Fedin
12e306dd7b Replace remaining multi-args 2021-03-15 11:21:05 +03:00
Ilya Fedin
508762cd2c Use static QFileInfo::exists 2021-03-15 11:21:05 +03:00
John Preston
9a73c99935 Beta version 2.6.2: Fix build. 2021-03-13 21:05:53 +04:00
John Preston
ab2c99acf3 Beta version 2.6.2.
- Fix text disappearing because of cloud drafts sync.
2021-03-13 20:16:23 +04:00
Ilya Fedin
a506e9b9eb Update submodules 2021-03-13 19:14:58 +03:00
Ilya Fedin
c0c10689a1 Get rid of deprecated ranges::view usage 2021-03-13 19:14:58 +03:00
Ilya Fedin
c4dcf064d5 Avoid multiple .arg usage as suggested by clazy 2021-03-13 19:08:33 +03:00
John Preston
d9771d0f88 Fix voice chat lottie animation on Retina screens. 2021-03-13 20:05:17 +04:00
Ilya Fedin
f25b2a2094 Apply autofixes from clazy 2021-03-13 15:25:47 +03:00
John Preston
c9934c142d Fix drafts time tracking. 2021-03-13 16:07:59 +04:00
John Preston
fb7a8cae33 Improve voice chat lottie animations. 2021-03-13 15:27:25 +04:00
John Preston
ae5c7b19f6 Fix refreshing MainWindow::desktopRect. 2021-03-13 14:37:58 +04:00
23rd
a5abe3d813 Added ability to Save / Delete GIFs from menu for inline bots.
Fixed #10511.
2021-03-13 12:59:12 +03:00
23rd
b373a9ed22 Fixed filling menu for inline bots and autocomplete in HistoryWidget.
Regression was introduced in e1017380ec.
2021-03-13 12:59:12 +03:00
23rd
09966fb291 Removed Q_OBJECT from Storage::Uploader. 2021-03-13 12:59:11 +03:00
23rd
d4bb62d055 Slightly refactored uploading of edit media. 2021-03-13 12:59:11 +03:00
John Preston
bbeb9d3950 Add error display on link sharing. 2021-03-12 22:38:30 +04:00
John Preston
ce84d9c84d Improve phrases in share voice chat link box. 2021-03-12 22:23:26 +04:00
John Preston
ed4dea2b0e Show and play 'allowed to speak' notification. 2021-03-12 21:51:39 +04:00
John Preston
4d4a349f09 Support sharing only listener invite link. 2021-03-12 20:20:19 +04:00
John Preston
7430fbacfd Allow remove raised hand from context menu. 2021-03-12 20:20:03 +04:00
John Preston
d624e2ef65 Fix build on macOS and Linux. 2021-03-12 19:21:35 +04:00
John Preston
0e72dc3974 Closed alpha version 2.6.1.1. 2021-03-12 17:31:10 +04:00
John Preston
68b0a85369 Rename RPCError to MTP::Error. 2021-03-12 16:58:26 +04:00
John Preston
5794679277 Don't accept drafts older than last saved.
I hope it finally fixes #4922, partially fixes #10001.

The rest of #10001 like RAM usage / crashes are unrelated to drafts.
2021-03-12 16:58:26 +04:00
John Preston
74c21039b3 Pass correct response timestamp to tgcalls. 2021-03-12 16:58:26 +04:00
John Preston
267e5fd9e0 Allow getting outer_msg_id in MTProto handlers. 2021-03-12 16:58:26 +04:00
John Preston
e681b0d95a Support new url-auth auto-logins in links. 2021-03-12 16:58:26 +04:00
John Preston
a2695ea0d7 Add CallMuteButton with lottie animations. 2021-03-12 16:58:26 +04:00
John Preston
c0df6f7bca Join voice chats by invite links. 2021-03-12 16:58:26 +04:00
John Preston
c587335ae1 Adapt share voice chat link box styles. 2021-03-12 16:58:26 +04:00
John Preston
16e1c740ce Support sharing speaker/listener link. 2021-03-12 16:58:26 +04:00
John Preston
6786d44b69 Start voice chat link sharing. 2021-03-12 16:58:26 +04:00
John Preston
cd8c9a58df Show 'about' in voice chats for everyone. 2021-03-12 16:58:26 +04:00
John Preston
ecbbdd5e74 Make custom 'Join As' menu item. 2021-03-12 16:58:26 +04:00
John Preston
a8a85b2acf Show correct tooltip on stopping recording. 2021-03-12 16:58:26 +04:00
John Preston
8ba77defeb Custom menu items for recording / leaving. 2021-03-12 16:58:26 +04:00
John Preston
84e8053cd0 Move group call menu to a separate module. 2021-03-12 16:58:26 +04:00
John Preston
506cd8c7ad Improve 'Join As' selector design. 2021-03-12 16:58:26 +04:00
John Preston
f8783c3bfc Move actions from Settings to Three-Dot-Menu. 2021-03-12 16:58:26 +04:00
John Preston
b24e5ce809 Update API scheme with voice chat links. 2021-03-12 16:58:26 +04:00
John Preston
18901a4dc7 Update tgcalls for better stream->rtc upgrade. 2021-03-12 16:58:26 +04:00
John Preston
81e08599dc Raising hands reorder participants only for admins. 2021-03-12 16:58:26 +04:00
John Preston
7edc91e29e Show recording indicator. 2021-03-12 16:58:26 +04:00
John Preston
50265afe93 Respect raise_hand_rating in participants list. 2021-03-12 16:58:26 +04:00
John Preston
4d8ac05d28 Improve mute/raise_hand saving. 2021-03-12 16:58:26 +04:00
John Preston
22aa57ad6f Add recording start/stop to Settings. 2021-03-12 16:58:26 +04:00
John Preston
5bea88fd66 Update tgcalls to use ffmpeg instead of opusfile. 2021-03-12 16:58:26 +04:00
John Preston
361e3565d4 Add raised hand display in participants list. 2021-03-12 16:58:26 +04:00
John Preston
fb579f1c10 Add ability to Raise Hand in ForceMuted state. 2021-03-12 16:58:26 +04:00
John Preston
f66d7088ef Support broadcast mode in voice chats. 2021-03-12 16:58:26 +04:00
John Preston
ccd440ea0b Update API scheme. 2021-03-12 16:58:26 +04:00
John Preston
f41abe0a28 Update tgcalls. 2021-03-12 16:58:26 +04:00
John Preston
cfd16c6f67 Ignore version in groupCall updates.
Otherwise we may skip participants update that changes the version.
2021-03-12 16:58:26 +04:00
John Preston
ef1d98f3cf Show about in voice chat channels. 2021-03-12 16:58:26 +04:00
John Preston
bc43168ca7 Add edit voice chat title. 2021-03-12 16:58:26 +04:00
John Preston
b670ca2a51 Allow to rejoin with changing of 'join_as'. 2021-03-12 16:58:26 +04:00
John Preston
4d093f78e2 Update self as channel in voice chats. 2021-03-12 16:58:26 +04:00
John Preston
02e9b8fd18 Support joining to voice chats as a channel. 2021-03-12 16:58:26 +04:00
John Preston
02517f7221 Update API scheme to layer 125. 2021-03-12 16:58:26 +04:00
John Preston
2734cab3f2 Add webkitgtk4-devel to Dockerfile. 2021-03-12 16:28:56 +04:00
John Preston
2509f05e28 Fix clearing of album thumbnails cache.
I hope it fixes #7361.
2021-03-12 16:09:58 +04:00
Ilya Fedin
8fee156d21 Restore collecting Qt debug info on Linux 2021-03-12 16:09:13 +04:00
Ilya Fedin
e493ab12dc Get rid of GetLauncherFilename
Use QGuiApplication::desktopFileName directly instead
2021-03-12 15:44:37 +04:00
Sprite
4d9c9bbd6f Add a comment to the header inclusion
Co-authored-by: 23rd <23rd@vivaldi.net>
2021-03-12 15:42:20 +04:00
Sprite
c7c145b226 Complete report action callback 2021-03-12 15:42:20 +04:00
23rd
504f5ee5d7 Improved text resizing in playback speed item. 2021-03-11 12:29:17 +03:00
Ilya Fedin
3d54192681 Update lib_base 2021-03-11 11:31:26 +04:00
Ilya Fedin
db0da70de6 Fix space on end of a g_warning 2021-03-11 11:19:26 +04:00
Ilya Fedin
59e6fd9989 Fallback to plain xdg-open as a last resort
Even though QDesktopServices::openUrl calls xdg-open, it doesn't fallback to xdg-open in confined environments.
This is useful in snap where portals aren't guaranteed to be present.
2021-03-11 11:19:26 +04:00
Ilya Fedin
b24cba99e2 Catch ListActivatableNames errors 2021-03-10 11:22:14 +04:00
Ilya Fedin
d6848c49e8 Fire reject signal on exceptions in XDP file dialog 2021-03-10 09:47:30 +04:00
Ilya Fedin
5d1601d9c9 Move Platform::FileDialog::Gtk::Supported to private namespace 2021-03-10 09:46:13 +04:00
Ilya Fedin
2c6a9614b2 Fix saving filename compatibility with xdg-desktop-portal-gtk 2021-03-10 09:46:13 +04:00
Ilya Fedin
cc736158a6 Get rid of QByteArray in djbStringHash 2021-03-10 09:46:13 +04:00
Ilya Fedin
817610ddd7 Get rid of RunShellCommand 2021-03-10 09:46:13 +04:00
Ilya Fedin
77c8ca76b7 Remove duplicate ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION in includes 2021-03-10 09:46:13 +04:00
Ilya Fedin
67cbe61879 Check if portal backend is present by absence of errors when getting portal version 2021-03-10 09:46:13 +04:00
Ilya Fedin
67eba93e29 Use gsl::finally in PortalAutostart 2021-03-10 09:46:13 +04:00
Ilya Fedin
b918170464 Add portal-based open with dialog implementation 2021-03-10 09:46:13 +04:00
Ilya Fedin
a27a54798c Update lib_ui 2021-03-10 08:57:16 +04:00
Ilya Fedin
5f1d56fbc2 Move gtk settings connections to getters 2021-03-10 08:57:16 +04:00
Ilya Fedin
1fc24398a0 React to moveEvent in media viewer 2021-03-06 12:08:20 +04:00
Ilya Fedin
99b7f051c7 Restore mouse button release hack in title widget event filter 2021-03-06 12:07:39 +04:00
23rd
658671089e Added timestamp highlighting in voice captions. 2021-03-05 13:36:39 +03:00
Ilya Fedin
092b6e7c18 Fix spaces on ends of lines 2021-03-05 13:31:56 +04:00
Ilya Fedin
23272430b4 Build with QT_NO_KEYWORDS 2021-03-04 12:07:54 +04:00
Ilya Fedin
a29ff093f6 Fix some lines length in specific_linux 2021-03-04 12:07:54 +04:00
Ilya Fedin
37a8afaddf Move remaining usage of dbus to glibmm in notifications_manager_linux 2021-03-04 12:07:54 +04:00
Ilya Fedin
b08c33cf8a Move remaining usage of dbus to glibmm in main_window_linux 2021-03-04 12:07:54 +04:00
Ilya Fedin
a2f8546033 Move remaining usage of dbus to glibmm in specific_linux 2021-03-04 12:07:54 +04:00
Ilya Fedin
580a12ad7f Wait for response in PortalAutostart 2021-03-04 12:07:54 +04:00
Ilya Fedin
d77df9905f Move NotificationServiceWatcher to glibmm 2021-03-04 12:07:54 +04:00
Ilya Fedin
82f92cffd3 Port XDPFileDialog to gdbus 2021-03-04 12:07:54 +04:00
Ilya Fedin
8042a83fd2 Move glib usage to glibmm 2021-03-04 12:07:54 +04:00
John Preston
b38d6667c4 Fix build on macOS. 2021-03-04 11:55:20 +04:00
Ilya Fedin
72704b2426 Move from lock-threads app to lock-threads action
lock-threads app seems to be deprecated
2021-03-03 23:14:13 +04:00
Daniil
3e379f3171 Expand moderating mode
Add additional moderating options.
2021-03-03 22:57:14 +04:00
GitHub Action
54685155b0 Update User-Agent for DNS to Chrome 88.0.4324.182. 2021-03-03 20:19:57 +04:00
John Preston
54f06740d5 Remove some App::wnd() calls. 2021-03-03 11:29:26 +04:00
John Preston
204dd0a869 Revert "Use custom method to focus main window on X11"
This reverts commit f9bba75395.

See #10441.
2021-03-01 11:47:59 +04:00
John Preston
8142acc709 Remove legacy #feed code. 2021-02-25 17:03:51 +04:00
23rd
df70fd3081 Fixed Github CI macOS build. 2021-02-25 08:42:16 +03:00
633 changed files with 25767 additions and 13174 deletions

3
.gitattributes vendored
View File

@@ -4,3 +4,6 @@
# Ensure diffs have LF endings
*.diff text eol=lf
*.bat text eol=crlf
# Ensure lottie animations are treated as binary files
*.lottie binary

21
.github/lock.yml vendored
View File

@@ -1,21 +0,0 @@
# Number of days of inactivity before a closed issue or pull request is locked
daysUntilLock: 45
# Skip issues and pull requests created before a given timestamp. Timestamp must
# follow ISO 8601 (`YYYY-MM-DD`). Set to `false` to disable
skipCreatedBefore: false
# Issues and pull requests with these labels will be ignored. Set to `[]` to disable
exemptLabels: []
# Label to add before locking, such as `outdated`. Set to `false` to disable
lockLabel: false
# Comment to post before locking. Set to `false` to disable
lockComment: >
This thread has been automatically locked since there has not been
any recent activity after it was closed. Please open a new issue for
related bugs.
# Assign `resolved` as the reason for locking. Set to `false` to disable
setLockReason: true

View File

@@ -55,7 +55,7 @@ jobs:
defaults:
run:
shell: scl enable devtoolset-8 -- bash --noprofile --norc -eo pipefail {0}
shell: scl enable devtoolset-9 -- bash --noprofile --norc -eo pipefail {0}
strategy:
matrix:
@@ -65,6 +65,8 @@ jobs:
- "DESKTOP_APP_DISABLE_X11_INTEGRATION"
- "DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION"
- "DESKTOP_APP_DISABLE_GTK_INTEGRATION"
- "LIBTGVOIP_DISABLE_ALSA"
- "LIBTGVOIP_DISABLE_PULSEAUDIO"
env:
UPLOAD_ARTIFACT: "false"

23
.github/workflows/lock.yml vendored Normal file
View File

@@ -0,0 +1,23 @@
name: 'Lock Threads'
on:
schedule:
- cron: '0 * * * *'
jobs:
lock:
runs-on: ubuntu-latest
steps:
- uses: dessant/lock-threads@v2
with:
github-token: ${{ github.token }}
issue-lock-inactive-days: 45
pr-lock-inactive-days: 45
issue-lock-comment: >
This issue has been automatically locked since there
has not been any recent activity after it was closed.
Please open a new issue for related bugs.
pr-lock-comment: >
This pull request has been automatically locked since there
has not been any recent activity after it was closed.
Please open a new issue for related bugs.

View File

@@ -56,7 +56,7 @@ jobs:
GIT: "https://github.com"
PREFIX: "/usr/local/macos"
MACOSX_DEPLOYMENT_TARGET: "10.12"
XZ: "xz-5.2.4"
XZ: "xz-5.2.5"
QT: "5_15_2"
OPENSSL_VER: "1_1_1"
QT_PREFIX: "/usr/local/desktop-app/Qt-5.15.2"
@@ -83,6 +83,9 @@ jobs:
brew install automake fdk-aac lame libass libtool libvorbis libvpx \
ninja opus sdl shtool texi2html theora x264 xvid yasm pkg-config
# Disable spotlight.
sudo mdutil -a -i off
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
xcodebuild -version > CACHE_KEY.txt
@@ -142,7 +145,7 @@ jobs:
cd mozjpeg
cmake -B build . \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr/local/macos \
-DCMAKE_INSTALL_PREFIX=$PREFIX \
-DWITH_JPEG8=ON \
-DPNG_SUPPORTED=OFF
cmake --build build -j$(nproc)
@@ -350,7 +353,7 @@ jobs:
- name: FFmpeg install.
run: |
cd $LibrariesPath
#List of files from cmake/external/ffmpeg/CMakeLists.txt.
# List of files from cmake/external/ffmpeg/CMakeLists.txt.
copyLib() {
mkdir -p ffmpeg/$1
\cp -fR ffmpeg-cache/lib/$1.a ffmpeg/$1/$1.a
@@ -361,17 +364,15 @@ jobs:
copyLib libswscale
copyLib libavutil
sudo cp -R ffmpeg-cache/. /usr/local/
sudo cp -R ffmpeg-cache/. $PREFIX
sudo cp -R ffmpeg-cache/include/. ffmpeg/
- name: OpenAL Soft.
run: |
cd $LibrariesPath
git clone $GIT/kcat/openal-soft.git
cd openal-soft
git checkout 3970252da9
cd build
git clone --branch capture_with_webrtc $GIT/telegramdesktop/openal-soft.git
cd openal-soft/build
CFLAGS="$UNGUARDED" CPPFLAGS="$UNGUARDED" cmake \
-D CMAKE_INSTALL_PREFIX:PATH=$PREFIX \
@@ -462,9 +463,9 @@ jobs:
-nomake examples \
-nomake tests \
-platform macx-clang \
-I "/usr/local/macos/include" \
LIBJPEG_LIBS="/usr/local/macos/lib/libjpeg.a" \
ZLIB_LIBS="/usr/local/macos/lib/libz.a"
-I "$PREFIX/include" \
LIBJPEG_LIBS="$PREFIX/lib/libjpeg.a" \
ZLIB_LIBS="$PREFIX/lib/libz.a"
make -j$(nproc)
sudo make install
@@ -486,12 +487,13 @@ jobs:
git clone --recursive $GIT/desktop-app/tg_owt.git
mkdir -p tg_owt/out/Debug
cd tg_owt/out/Debug
cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug \
cmake -G Ninja \
-DCMAKE_BUILD_TYPE=Debug \
-DTG_OWT_SPECIAL_TARGET=mac \
-DTG_OWT_LIBJPEG_INCLUDE_PATH=/usr/local/macos/include \
-DTG_OWT_LIBJPEG_INCLUDE_PATH=$PREFIX/include \
-DTG_OWT_OPENSSL_INCLUDE_PATH=`pwd`/../../../openssl_$OPENSSL_VER/include \
-DTG_OWT_OPUS_INCLUDE_PATH=$PREFIX/include/opus \
-DTG_OWT_FFMPEG_INCLUDE_PATH=/usr/local/include \
-DTG_OWT_FFMPEG_INCLUDE_PATH=$PREFIX/include \
../..
ninja

View File

@@ -128,7 +128,7 @@ jobs:
shell: bash
run: |
echo "Find any version of Python 2."
p=`ls /c/hostedtoolcache/windows/python | grep 2 | tail -1`
p=`ls /c/hostedtoolcache/windows/python | grep "^2" | tail -1`
if [ -z "$p" ]; then
echo "Python 2 is not found."
exit 1
@@ -409,6 +409,7 @@ jobs:
-D TDESKTOP_API_TEST=ON ^
-D DESKTOP_APP_USE_PACKAGED=OFF ^
-D DESKTOP_APP_DISABLE_CRASH_REPORTS=OFF ^
-D DESKTOP_APP_NO_PDB=ON ^
%TDESKTOP_BUILD_DEFINE% ^
-DCMAKE_SYSTEM_VERSION=%SDK%

2
.gitignore vendored
View File

@@ -48,3 +48,5 @@ stage
/Linux/
/Telegram/Makefile
*.*~
.idea/
cmake-build-debug/

3
.gitmodules vendored
View File

@@ -88,3 +88,6 @@
[submodule "Telegram/ThirdParty/tgcalls"]
path = Telegram/ThirdParty/tgcalls
url = https://github.com/TelegramMessenger/tgcalls.git
[submodule "Telegram/lib_webview"]
path = Telegram/lib_webview
url = https://github.com/desktop-app/lib_webview.git

View File

@@ -62,7 +62,7 @@ Version **1.8.15** was the last that supports older systems
## Build instructions
* [Visual Studio 2019][msvc]
* Visual Studio 2019 [(32 bits)][msvc32] [(64 bits)][msvc64]
* [Xcode 12][xcode]
* [CMake on GNU/Linux][cmake]
@@ -72,7 +72,8 @@ Version **1.8.15** was the last that supports older systems
[telegram_api]: https://core.telegram.org
[telegram_proto]: https://core.telegram.org/mtproto
[license]: LICENSE
[msvc]: docs/building-msvc.md
[msvc32]: docs/building-msvc.md
[msvc64]: docs/building-msvc-x64.md
[xcode]: docs/building-xcode.md
[xcode_old]: docs/building-xcode-old.md
[cmake]: docs/building-cmake.md

View File

@@ -19,6 +19,7 @@ add_subdirectory(lib_storage)
add_subdirectory(lib_lottie)
add_subdirectory(lib_qr)
add_subdirectory(lib_webrtc)
add_subdirectory(lib_webview)
add_subdirectory(codegen)
get_filename_component(src_loc SourceFiles REALPATH)
@@ -26,6 +27,7 @@ get_filename_component(res_loc Resources REALPATH)
include(cmake/telegram_options.cmake)
include(cmake/lib_ffmpeg.cmake)
include(cmake/lib_stripe.cmake)
include(cmake/lib_tgvoip.cmake)
include(cmake/lib_tgcalls.cmake)
include(cmake/td_export.cmake)
@@ -35,6 +37,11 @@ include(cmake/td_scheme.cmake)
include(cmake/td_ui.cmake)
include(cmake/generate_appdata_changelog.cmake)
if (WIN32)
include(cmake/generate_midl.cmake)
generate_midl(Telegram ${src_loc}/platform/win/windows_quiethours.idl)
endif()
set_target_properties(Telegram PROPERTIES AUTOMOC ON AUTORCC ON)
target_link_libraries(Telegram
@@ -55,7 +62,9 @@ PRIVATE
desktop-app::lib_storage
desktop-app::lib_lottie
desktop-app::lib_qr
desktop-app::lib_webview
desktop-app::lib_ffmpeg
desktop-app::lib_stripe
desktop-app::external_lz4
desktop-app::external_rlottie
desktop-app::external_zlib
@@ -70,9 +79,15 @@ PRIVATE
desktop-app::external_xxhash
)
if (LINUX)
if (WIN32)
target_link_libraries(Telegram
PRIVATE
desktop-app::lib_webview_winrt
)
elseif (LINUX)
target_link_libraries(Telegram
PRIVATE
desktop-app::external_glibmm
desktop-app::external_glib
)
@@ -248,8 +263,6 @@ PRIVATE
boxes/sessions_box.h
boxes/share_box.cpp
boxes/share_box.h
boxes/single_choice_box.cpp
boxes/single_choice_box.h
boxes/sticker_set_box.cpp
boxes/sticker_set_box.h
boxes/stickers_box.cpp
@@ -262,11 +275,15 @@ PRIVATE
calls/calls_box_controller.h
calls/calls_call.cpp
calls/calls_call.h
calls/calls_choose_join_as.cpp
calls/calls_choose_join_as.h
calls/calls_group_call.cpp
calls/calls_group_call.h
calls/calls_group_common.h
calls/calls_group_members.cpp
calls/calls_group_members.h
calls/calls_group_menu.cpp
calls/calls_group_menu.h
calls/calls_group_panel.cpp
calls/calls_group_panel.h
calls/calls_group_settings.cpp
@@ -378,8 +395,6 @@ PRIVATE
data/data_cloud_file.h
data/data_cloud_themes.cpp
data/data_cloud_themes.h
data/data_countries.cpp
data/data_countries.h
data/data_document.cpp
data/data_document.h
data/data_document_media.cpp
@@ -388,8 +403,6 @@ PRIVATE
data/data_drafts.h
data/data_folder.cpp
data/data_folder.h
# data/data_feed_messages.cpp
# data/data_feed_messages.h
data/data_file_origin.cpp
data/data_file_origin.h
data/data_flags.h
@@ -412,6 +425,8 @@ PRIVATE
data/data_notify_settings.h
data/data_peer.cpp
data/data_peer.h
data/data_peer_id.cpp
data/data_peer_id.h
data/data_peer_values.cpp
data/data_peer_values.h
data/data_photo.cpp
@@ -490,8 +505,6 @@ PRIVATE
history/admin_log/history_admin_log_item.h
history/admin_log/history_admin_log_section.cpp
history/admin_log/history_admin_log_section.h
# history/feed/history_feed_section.cpp
# history/feed/history_feed_section.h
history/view/controls/compose_controls_common.h
history/view/controls/history_view_compose_controls.cpp
history/view/controls/history_view_compose_controls.h
@@ -610,22 +623,10 @@ PRIVATE
info/info_top_bar.h
info/info_wrap_widget.cpp
info/info_wrap_widget.h
# info/channels/info_channels_widget.cpp
# info/channels/info_channels_widget.h
info/common_groups/info_common_groups_inner_widget.cpp
info/common_groups/info_common_groups_inner_widget.h
info/common_groups/info_common_groups_widget.cpp
info/common_groups/info_common_groups_widget.h
# info/feed/info_feed_channels.cpp
# info/feed/info_feed_channels.h
# info/feed/info_feed_channels_controllers.cpp
# info/feed/info_feed_channels_controllers.h
# info/feed/info_feed_cover.cpp
# info/feed/info_feed_cover.h
# info/feed/info_feed_profile_inner_widget.cpp
# info/feed/info_feed_profile_inner_widget.h
# info/feed/info_feed_profile_widget.cpp
# info/feed/info_feed_profile_widget.h
info/media/info_media_buttons.h
info/media/info_media_empty_widget.cpp
info/media/info_media_empty_widget.h
@@ -807,8 +808,6 @@ PRIVATE
passport/passport_panel.h
passport/passport_panel_controller.cpp
passport/passport_panel_controller.h
passport/passport_panel_details_row.cpp
passport/passport_panel_details_row.h
passport/passport_panel_edit_contact.cpp
passport/passport_panel_edit_contact.h
passport/passport_panel_edit_document.cpp
@@ -819,6 +818,10 @@ PRIVATE
passport/passport_panel_form.h
passport/passport_panel_password.cpp
passport/passport_panel_password.h
payments/payments_checkout_process.cpp
payments/payments_checkout_process.h
payments/payments_form.cpp
payments/payments_form.h
platform/linux/linux_desktop_environment.cpp
platform/linux/linux_desktop_environment.h
platform/linux/linux_gdk_helper.cpp
@@ -830,14 +833,18 @@ PRIVATE
platform/linux/linux_gtk_integration_p.h
platform/linux/linux_gtk_integration.cpp
platform/linux/linux_gtk_integration.h
platform/linux/linux_gtk_open_with_dialog.cpp
platform/linux/linux_gtk_open_with_dialog.h
platform/linux/linux_mpris_support.cpp
platform/linux/linux_mpris_support.h
platform/linux/linux_notification_service_watcher.cpp
platform/linux/linux_notification_service_watcher.h
platform/linux/linux_open_with_dialog.cpp
platform/linux/linux_open_with_dialog.h
platform/linux/linux_wayland_integration.cpp
platform/linux/linux_wayland_integration.h
platform/linux/linux_xdp_file_dialog.cpp
platform/linux/linux_xdp_file_dialog.h
platform/linux/linux_xdp_open_with_dialog.cpp
platform/linux/linux_xdp_open_with_dialog.h
platform/linux/file_utilities_linux.cpp
platform/linux/file_utilities_linux.h
platform/linux/launcher_linux.cpp
@@ -976,8 +983,6 @@ PRIVATE
storage/storage_domain.h
storage/storage_facade.cpp
storage/storage_facade.h
# storage/storage_feed_messages.cpp
# storage/storage_feed_messages.h
storage/storage_media_prepare.cpp
storage/storage_media_prepare.h
storage/storage_shared_media.cpp
@@ -1016,8 +1021,6 @@ PRIVATE
ui/widgets/level_meter.h
ui/widgets/multi_select.cpp
ui/widgets/multi_select.h
ui/widgets/separate_panel.cpp
ui/widgets/separate_panel.h
ui/countryinput.cpp
ui/countryinput.h
ui/empty_userpic.cpp
@@ -1033,8 +1036,6 @@ PRIVATE
ui/search_field_controller.h
ui/special_buttons.cpp
ui/special_buttons.h
ui/special_fields.cpp
ui/special_fields.h
ui/unread_badge.cpp
ui/unread_badge.h
window/main_window.cpp
@@ -1124,10 +1125,14 @@ if (DESKTOP_APP_DISABLE_DBUS_INTEGRATION)
remove_target_sources(Telegram ${src_loc}
platform/linux/linux_gsd_media_keys.cpp
platform/linux/linux_gsd_media_keys.h
platform/linux/linux_mpris_support.cpp
platform/linux/linux_mpris_support.h
platform/linux/linux_notification_service_watcher.cpp
platform/linux/linux_notification_service_watcher.h
platform/linux/linux_xdp_file_dialog.cpp
platform/linux/linux_xdp_file_dialog.h
platform/linux/linux_xdp_open_with_dialog.cpp
platform/linux/linux_xdp_open_with_dialog.h
platform/linux/notifications_manager_linux.cpp
)
@@ -1150,8 +1155,8 @@ if (DESKTOP_APP_DISABLE_GTK_INTEGRATION)
platform/linux/linux_gtk_file_dialog.h
platform/linux/linux_gtk_integration_p.h
platform/linux/linux_gtk_integration.cpp
platform/linux/linux_open_with_dialog.cpp
platform/linux/linux_open_with_dialog.h
platform/linux/linux_gtk_open_with_dialog.cpp
platform/linux/linux_gtk_open_with_dialog.h
)
nice_target_sources(Telegram ${src_loc}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 718 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1008 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 566 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 328 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 626 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 841 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 748 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 213 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 249 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 300 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 228 B

After

Width:  |  Height:  |  Size: 338 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 341 B

After

Width:  |  Height:  |  Size: 569 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 427 B

After

Width:  |  Height:  |  Size: 768 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 B

After

Width:  |  Height:  |  Size: 305 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 234 B

After

Width:  |  Height:  |  Size: 428 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 273 B

After

Width:  |  Height:  |  Size: 550 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 802 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 357 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 560 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 985 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 949 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 473 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 884 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 711 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 526 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1022 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -216,6 +216,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_code_desc" = "We have sent you a message with activation\ncode to your phone. Please enter it below.";
"lng_code_from_telegram" = "Please enter the code you've just received\nin your previous **Telegram** app.";
"lng_code_no_telegram" = "Send code via SMS";
"lng_code_register_phone" = "If you already signed up for Telegram, please enter the code which was sent to your mobile app.\n\nIf you havent signed up yet, please register from your phone or tablet first.";
"lng_code_call" = "Telegram will call you in {minutes}:{seconds}";
"lng_code_calling" = "Requesting a call from Telegram...";
"lng_code_called" = "Telegram dialed your number";
@@ -453,6 +454,15 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_settings_sensitive_title" = "Sensitive content";
"lng_settings_sensitive_disable_filtering" = "Disable filtering";
"lng_settings_sensitive_about" = "Display sensitive media in public channels on all your Telegram devices.";
"lng_settings_security_bots" = "Bots and websites";
"lng_settings_clear_payment_info" = "Clear Payment and Shipping Info";
"lng_clear_payment_info_title" = "Clear payment info";
"lng_clear_payment_info_sure" = "Are you sure you want to clear your payment and shipping info?";
"lng_clear_payment_info_shipping" = "Shipping info";
"lng_clear_payment_info_payment" = "Payment info";
"lng_clear_payment_info_clear" = "Clear";
"lng_clear_payment_info_confirm" = "Delete your shipping info and instruct all payment providers to remove your saved credit cards? Note that Telegram never stores your credit card data.";
"lng_settings_auto_night_mode" = "Auto-Night mode";
"lng_settings_auto_night_enabled" = "Match the system settings";
@@ -1097,8 +1107,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_action_invite_user_chat" = "the voice chat";
"lng_action_invite_users_and_one" = "{accumulated}, {user}";
"lng_action_invite_users_and_last" = "{accumulated} and {user}";
"lng_action_group_call_started" = "{from} started {chat}";
"lng_action_group_call_started_chat" = "a voice chat";
"lng_action_group_call_started_group" = "{from} started a voice chat";
"lng_action_group_call_started_channel" = "Voice chat started";
"lng_action_group_call_scheduled_group" = "{from} scheduled a voice chat for {date}";
"lng_action_group_call_scheduled_channel" = "Voice chat scheduled for {date}";
"lng_action_group_call_finished" = "Voice chat finished ({duration})";
"lng_action_add_user" = "{from} added {user}";
"lng_action_add_users_many" = "{from} added {users}";
@@ -1854,11 +1866,66 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_theme_editor_menu_show" = "Show palette file";
"lng_payments_not_supported" = "Sorry, Telegram Desktop doesn't support payments yet. Please use one of our mobile apps to do this.";
"lng_payments_webview_no_card" = "Unfortunately, you can't add a new card with current system configuration.";
"lng_payments_webview_no_use" = "Unfortunately, you can't use payments with current system configuration.";
"lng_payments_webview_install_edge" = "Please install {link}.";
"lng_payments_webview_install_webkit" = "Please install WebKitGTK 4 (webkit2gtk-4.0) using your package manager.";
"lng_payments_webview_switch_mutter" = "Qt's window embedding doesn't work well with Mutter window manager. Please switch to another window manager or desktop environment.";
"lng_payments_webview_switch_wayland" = "There is no way to embed WebView window on Wayland. Please switch to X11.";
"lng_payments_sure_close" = "Are you sure you want to close this payment form? The changes you made will be lost.";
"lng_payments_receipt_label" = "Receipt";
"lng_payments_receipt_label_test" = "Test receipt";
"lng_payments_invoice_label" = "Invoice";
"lng_payments_invoice_label_test" = "Test invoice";
"lng_payments_receipt_button" = "Receipt";
"lng_payments_success" = "You paid {amount} for {title}.";
"lng_payments_checkout_title" = "Checkout";
"lng_payments_receipt_title" = "Receipt";
"lng_payments_total_label" = "Total";
"lng_payments_date_label" = "Paid";
"lng_payments_pay_amount" = "Pay {amount}";
"lng_payments_payment_method" = "Payment Method";
"lng_payments_new_card" = "New Card...";
"lng_payments_shipping_address" = "Shipping Address";
"lng_payments_address_street1" = "Address 1";
"lng_payments_address_street2" = "Address 2";
"lng_payments_address_city" = "City";
"lng_payments_address_state" = "State";
"lng_payments_address_country" = "Country";
"lng_payments_address_postcode" = "Postcode";
"lng_payments_shipping_method" = "Shipping Method";
"lng_payments_info_name" = "Name";
"lng_payments_info_email" = "Email";
"lng_payments_info_phone" = "Phone";
"lng_payments_to_provider_phone_email" = "Phone and Email will be passed to {provider} as billing info.";
"lng_payments_to_provider_email" = "Email will be passed to {provider} as billing info.";
"lng_payments_to_provider_phone" = "Phone will be passed to {provider} as billing info.";
"lng_payments_processed_by" = "Processed by {provider}";
"lng_payments_warning_title" = "Warning";
"lng_payments_warning_body" = "Neither Telegram, nor {bot1} will have access to your credit card information. Credit card details will be handled only by the payment system, {provider}.\n\nPayments will go directly to the developer of {bot2}. Telegram cannot provide any guarantees, so proceed at your own risk. In case of problems, please contact the developer of {bot3} or your bank.";
"lng_payments_shipping_address_title" = "Shipping Information";
"lng_payments_card_title" = "New Card";
"lng_payments_card_number" = "Card Number";
"lng_payments_card_holder" = "Cardholder name";
"lng_payments_billing_address" = "Billing Information";
"lng_payments_billing_country" = "Country";
"lng_payments_billing_zip_code" = "Zip Code";
"lng_payments_save_information" = "Save Information for future use";
"lng_payments_need_password" = "You can save your payment information for future use. Please turn on Two-Step Verification to enable this.";
"lng_payments_password_title" = "Payment Confirmation";
"lng_payments_password_description" = "Your card {card} is on file. To pay with this card, please enter your 2-Step-Verification password.";
"lng_payments_password_submit" = "Pay";
"lng_payments_tips_label" = "Tip (Optional)";
"lng_payments_tips_box_title" = "Add Tip";
"lng_payments_tips_max" = "Max possible tip amount: {amount}";
"lng_payments_shipping_not_available" = "Shipping to the selected country is not available.";
"lng_payments_card_declined" = "Your card was declined.";
"lng_payments_payment_failed" = "Payment failed. Your card has not been billed.";
"lng_payments_precheckout_failed" = "The bot couldn't process your payment. Your card has not been billed.";
"lng_payments_already_paid" = "You have already paid for this item.";
"lng_call_status_incoming" = "is calling you...";
"lng_call_status_connecting" = "connecting...";
@@ -1923,18 +1990,28 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_group_call_title" = "Voice Chat";
"lng_group_call_active" = "speaking";
"lng_group_call_inactive" = "listening";
"lng_group_call_raised_hand_status" = "wants to speak";
"lng_group_call_settings" = "Settings";
"lng_group_call_share_button" = "Share";
"lng_group_call_unmute" = "Unmute";
"lng_group_call_unmute_sub" = "or hold spacebar to talk";
"lng_group_call_you_are_live" = "You are Live";
"lng_group_call_force_muted" = "Muted by admin";
"lng_group_call_force_muted_sub" = "You are in Listen Only mode";
"lng_group_call_raise_hand_tip" = "Click if you want to speak";
"lng_group_call_raised_hand" = "You asked to speak";
"lng_group_call_raised_hand_sub" = "We let the speakers know";
"lng_group_call_connecting" = "Connecting...";
"lng_group_call_leave" = "Leave";
"lng_group_call_leave_title" = "Leave voice chat";
"lng_group_call_leave_sure" = "Are you sure you want to leave this voice chat?";
"lng_group_call_close" = "Close";
"lng_group_call_close_sure" = "Voice chat is scheduled. You can abort it or just close this panel.";
"lng_group_call_also_cancel" = "Abort voice chat";
"lng_group_call_leave_to_other_sure" = "Do you want to leave your active voice chat and join a voice chat in this group?";
"lng_group_call_create_sure" = "Do you really want to start a voice chat in this group?";
"lng_group_call_create_sure_channel" = "Are you sure you want to start a voice chat in this channel as your personal account?";
"lng_group_call_join_sure_personal" = "Are you sure you want to join this voice chat as your personal account?";
"lng_group_call_also_end" = "End voice chat";
"lng_group_call_settings_title" = "Settings";
"lng_group_call_invite" = "Invite Member";
@@ -1947,7 +2024,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_group_call_add_to_group_all" = "Those users aren't members of «{group}» yet. Add them to the group?";
"lng_group_call_invite_members" = "Group members";
"lng_group_call_invite_search_results" = "Search results";
"lng_group_call_new_muted" = "Mute new members";
"lng_group_call_new_muted" = "Mute new participants";
"lng_group_call_speakers" = "Speakers";
"lng_group_call_microphone" = "Microphone";
"lng_group_call_push_to_talk" = "Push to Talk Shortcut";
@@ -1957,8 +2034,13 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_group_call_ptt_delay_s" = "{amount}s";
"lng_group_call_ptt_delay" = "Push to Talk release delay: {delay}";
"lng_group_call_share" = "Share Invite Link";
"lng_group_call_share_speaker" = "Users with this link can speak";
"lng_group_call_copy_speaker_link" = "Copy Speaker Link";
"lng_group_call_copy_listener_link" = "Copy Listener Link";
"lng_group_call_end" = "End Voice Chat";
"lng_group_call_cancel" = "Abort Voice Chat";
"lng_group_call_join" = "Join";
"lng_group_call_join_confirm" = "Do you want to join the voice chat {chat}?";
"lng_group_call_invite_done_user" = "You invited {user} to the voice chat.";
"lng_group_call_invite_done_many#one" = "You invited **{count} member** to the voice chat.";
"lng_group_call_invite_done_many#other" = "You invited **{count} members** to the voice chat.";
@@ -1969,8 +2051,11 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_group_call_too_many" = "Sorry, there are too many members in this voice chat. Please try again later.";
"lng_group_call_context_mute" = "Mute";
"lng_group_call_context_unmute" = "Allow to speak";
"lng_group_call_context_remove_hand" = "Cancel request to speak";
"lng_group_call_context_mute_for_me" = "Mute for me";
"lng_group_call_context_unmute_for_me" = "Unmute for me";
"lng_group_call_context_remove" = "Remove";
"lng_group_call_remove_channel" = "Remove {channel} from the voice chat?";
"lng_group_call_duration_days#one" = "{count} day";
"lng_group_call_duration_days#other" = "{count} days";
"lng_group_call_duration_hours#one" = "{count} hour";
@@ -1984,6 +2069,50 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_group_call_mac_accessibility" = "Please allow **Accessibility** for Telegram in Privacy Settings.\n\nApp restart may be required.";
"lng_group_call_mac_settings" = "Open Settings";
"lng_group_call_start_as_header" = "Start Voice Chat as...";
"lng_group_call_join_as_header" = "Join Voice Chat as...";
"lng_group_call_display_as_header" = "Display me as...";
"lng_group_call_join_as_about" = "Choose whether you want to be displayed as your personal account or as your channel.";
"lng_group_call_or_schedule" = "You can also {link}.";
"lng_group_call_schedule" = "schedule a voice chat";
"lng_group_call_schedule_title" = "Schedule Voice Chat";
"lng_group_call_schedule_notified_group" = "The members of the group will be notified that the voice chat will start in {duration}.";
"lng_group_call_schedule_notified_channel" = "The subscribers of the channel will be notified that the voice chat will start in {duration}.";
"lng_group_call_scheduled_status" = "Scheduled";
"lng_group_call_scheduled_title" = "Scheduled Voice Chat";
"lng_group_call_starts_short" = "Starts {when}";
"lng_group_call_starts" = "Voice Chat starts {when}";
"lng_group_call_starts_today" = "today at {time}";
"lng_group_call_starts_tomorrow" = "tomorrow at {time}";
"lng_group_call_starts_date" = "{date} at {time}";
"lng_group_call_starts_in" = "Starts in";
"lng_group_call_late_by" = "Late by";
"lng_group_call_starts_short_today" = "Today, {time}";
"lng_group_call_starts_short_tomorrow" = "Tomorrow, {time}";
"lng_group_call_starts_short_date" = "{date}, {time}";
"lng_group_call_start_now" = "Start Now";
"lng_group_call_start_now_sure" = "Are you sure you want to start the voice chat now?";
"lng_group_call_set_reminder" = "Set Reminder";
"lng_group_call_cancel_reminder" = "Cancel Reminder";
"lng_group_call_join_as_personal" = "personal account";
"lng_group_call_edit_title" = "Edit voice chat title";
"lng_group_call_switch_done" = "Members of this voice chat will now see you as **{user}**";
"lng_group_call_edit_title_header" = "Voice chat title";
"lng_group_call_recording_start" = "Start recording";
"lng_group_call_recording_stop" = "Stop recording";
"lng_group_call_recording_started" = "Voice chat recording started.";
"lng_group_call_recording_stopped" = "Voice chat recording stopped.";
"lng_group_call_recording_saved" = "Audio saved to Saved Messages.";
"lng_group_call_recording_start_sure" = "Do you want to start recording this chat and save the result into an audio file?\n\nOther members will see the chat is being recorded.";
"lng_group_call_recording_stop_sure" = "Do you want to stop recording this chat?";
"lng_group_call_recording_start_field" = "Recording Title";
"lng_group_call_recording_start_button" = "Start";
"lng_group_call_is_recorded" = "Voice chat is being recorded.";
"lng_group_call_can_speak_here" = "You can now speak.";
"lng_group_call_can_speak" = "You can now speak in {chat}.";
"lng_group_call_title_changed" = "Voice chat title changed to {title}";
"lng_group_call_join_as_changed" = "Members of this voice chat will now see you as {name}";
"lng_no_mic_permission" = "Telegram needs access to your microphone so that you can make calls and record voice messages.";
"lng_player_message_today" = "Today at {time}";
@@ -2190,6 +2319,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_admin_log_stopped_poll" = "{from} stopped poll:";
"lng_admin_log_invited" = "invited {user}";
"lng_admin_log_banned" = "banned {user}";
"lng_admin_log_unbanned" = "unbanned {user}";
"lng_admin_log_restricted" = "changed restrictions for {user} {until}";
"lng_admin_log_promoted" = "changed privileges for {user}";
"lng_admin_log_transferred" = "transferred ownership to {user}";
@@ -2238,34 +2368,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_admin_log_admin_manage_calls" = "Manage voice chats";
"lng_admin_log_admin_add_admins" = "Add new admins";
// #feed
//"lng_feed_name" = "Feed";
//"lng_feed_show_next" = "Show Next";
//"lng_feed_group" = "Group in feed";
//"lng_feed_ungroup" = "Ungroup from feed";
//"lng_feed_channel_added" = "Channel added to your feed.";
//"lng_feed_channel_removed" = "Channel removed from your feed.";
//"lng_feed_no_messages" = "No messages in this feed yet";
//"lng_feed_channels#one" = "{count} channel";
//"lng_feed_channels#other" = "{count} channels";
//"lng_feed_notifications" = "Feed notifications";
//"lng_feed_ungroup_all" = "Ungroup all channels";
//"lng_feed_sure_ungroup_all" = "Are you sure you want to ungroup all channels from this feed?";
//"lng_feed_ungroup_sure" = "Ungroup";
//"lng_feed_create_new" = "New feed";
//"lng_feed_too_few_channels#one" = "You need at least {count} channel to create a feed.";
//"lng_feed_too_few_channels#other" = "You need at least {count} channels to create a feed.";
//"lng_feed_select_more_channels#one" = "Select {count} channel or more.";
//"lng_feed_select_more_channels#other" = "Select {count} channels or more.";
//"lng_feed_create" = "Create";
//"lng_feed_edit_title" = "Edit feed";
//"lng_feed_channels_not_found" = "No channels found";
//"lng_info_feed_title" = "Feed Info";
//"lng_info_feed_is_default" = "Group new channels";
//"lng_info_feed_channels" = "Channels";
"lng_terms_signup" = "By signing up,\nyou agree to the {link}.";
"lng_terms_signup_link" = "Terms of Service";
"lng_terms_header" = "Terms of Service";
@@ -2465,6 +2567,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_export_state_chats_list" = "Processing chats...";
"lng_export_state_chats" = "Chats";
"lng_export_state_ready_progress" = "{ready} / {total}";
"lng_export_skip_file" = "Skip this file";
"lng_export_progress" = "You can close this window now. Please don't quit Telegram until the data export is completed.";
"lng_export_stop" = "Stop";
"lng_export_sure_stop" = "Are you sure you want to stop exporting your data?\n\nIf you do, you'll need to start over.";

View File

@@ -9,5 +9,6 @@
<file alias="group_call_start.mp3">../../sounds/group_call_start.mp3</file>
<file alias="group_call_connect.mp3">../../sounds/group_call_connect.mp3</file>
<file alias="group_call_end.mp3">../../sounds/group_call_end.mp3</file>
<file alias="group_call_allowed.mp3">../../sounds/group_call_allowed.mp3</file>
</qresource>
</RCC>

View File

@@ -59,6 +59,8 @@
<file alias="day-blue.tdesktop-theme">../../day-blue.tdesktop-theme</file>
<file alias="night.tdesktop-theme">../../night.tdesktop-theme</file>
<file alias="night-green.tdesktop-theme">../../night-green.tdesktop-theme</file>
<file alias="icons/calls/hands.lottie">../../icons/calls/hands.lottie</file>
<file alias="icons/calls/voice.lottie">../../icons/calls/voice.lottie</file>
</qresource>
<qresource prefix="/qt-project.org">
<file>../qmime/freedesktop.org.xml</file>

Binary file not shown.

View File

@@ -68,7 +68,7 @@ inputMediaVenue#c13d1c11 geo_point:InputGeoPoint title:string address:string pro
inputMediaPhotoExternal#e5bbfe1a flags:# url:string ttl_seconds:flags.0?int = InputMedia;
inputMediaDocumentExternal#fb52dc99 flags:# url:string ttl_seconds:flags.0?int = InputMedia;
inputMediaGame#d33f43f3 id:InputGame = InputMedia;
inputMediaInvoice#f4e096c3 flags:# title:string description:string photo:flags.0?InputWebDocument invoice:Invoice payload:bytes provider:string provider_data:DataJSON start_param:string = InputMedia;
inputMediaInvoice#f4e096c3 flags:# multiple_allowed:flags.1?true can_forward:flags.2?true title:string description:string photo:flags.0?InputWebDocument invoice:Invoice payload:bytes provider:string provider_data:DataJSON start_param:string = InputMedia;
inputMediaGeoLive#971fa843 flags:# stopped:flags.0?true geo_point:InputGeoPoint heading:flags.2?int period:flags.1?int proximity_notification_radius:flags.3?int = InputMedia;
inputMediaPoll#f94e5f1 flags:# poll:Poll correct_answers:flags.0?Vector<bytes> solution:flags.1?string solution_entities:flags.1?Vector<MessageEntity> = InputMedia;
inputMediaDice#e66fbf7b emoticon:string = InputMedia;
@@ -90,8 +90,9 @@ inputSecureFileLocation#cbc7ee28 id:long access_hash:long = InputFileLocation;
inputTakeoutFileLocation#29be5899 = InputFileLocation;
inputPhotoFileLocation#40181ffe id:long access_hash:long file_reference:bytes thumb_size:string = InputFileLocation;
inputPhotoLegacyFileLocation#d83466f3 id:long access_hash:long file_reference:bytes volume_id:long local_id:int secret:long = InputFileLocation;
inputPeerPhotoFileLocation#27d69997 flags:# big:flags.0?true peer:InputPeer volume_id:long local_id:int = InputFileLocation;
inputStickerSetThumb#dbaeae9 stickerset:InputStickerSet volume_id:long local_id:int = InputFileLocation;
inputPeerPhotoFileLocation#37257e99 flags:# big:flags.0?true peer:InputPeer photo_id:long = InputFileLocation;
inputStickerSetThumb#9d84f3db stickerset:InputStickerSet thumb_version:int = InputFileLocation;
inputGroupCallStream#bba51639 call:InputGroupCall time_ms:long scale:int = InputFileLocation;
peerUser#9db1bc6d user_id:int = Peer;
peerChat#bad0e5bb chat_id:int = Peer;
@@ -112,7 +113,7 @@ userEmpty#200250ba id:int = User;
user#938458c1 flags:# self:flags.10?true contact:flags.11?true mutual_contact:flags.12?true deleted:flags.13?true bot:flags.14?true bot_chat_history:flags.15?true bot_nochats:flags.16?true verified:flags.17?true restricted:flags.18?true min:flags.20?true bot_inline_geo:flags.21?true support:flags.23?true scam:flags.24?true apply_min_photo:flags.25?true fake:flags.26?true id:int access_hash:flags.0?long first_name:flags.1?string last_name:flags.2?string username:flags.3?string phone:flags.4?string photo:flags.5?UserProfilePhoto status:flags.6?UserStatus bot_info_version:flags.14?int restriction_reason:flags.18?Vector<RestrictionReason> bot_inline_placeholder:flags.19?string lang_code:flags.22?string = User;
userProfilePhotoEmpty#4f11bae1 = UserProfilePhoto;
userProfilePhoto#69d3ab26 flags:# has_video:flags.0?true photo_id:long photo_small:FileLocation photo_big:FileLocation dc_id:int = UserProfilePhoto;
userProfilePhoto#82d1f706 flags:# has_video:flags.0?true photo_id:long stripped_thumb:flags.1?bytes dc_id:int = UserProfilePhoto;
userStatusEmpty#9d05049 = UserStatus;
userStatusOnline#edb93949 expires:int = UserStatus;
@@ -127,8 +128,8 @@ chatForbidden#7328bdb id:int title:string = Chat;
channel#d31a961e flags:# creator:flags.0?true left:flags.2?true broadcast:flags.5?true verified:flags.7?true megagroup:flags.8?true restricted:flags.9?true signatures:flags.11?true min:flags.12?true scam:flags.19?true has_link:flags.20?true has_geo:flags.21?true slowmode_enabled:flags.22?true call_active:flags.23?true call_not_empty:flags.24?true fake:flags.25?true gigagroup:flags.26?true id:int access_hash:flags.13?long title:string username:flags.6?string photo:ChatPhoto date:int version:int restriction_reason:flags.9?Vector<RestrictionReason> admin_rights:flags.14?ChatAdminRights banned_rights:flags.15?ChatBannedRights default_banned_rights:flags.18?ChatBannedRights participants_count:flags.17?int = Chat;
channelForbidden#289da732 flags:# broadcast:flags.5?true megagroup:flags.8?true id:int access_hash:long title:string until_date:flags.16?int = Chat;
chatFull#f06c4018 flags:# can_set_username:flags.7?true has_scheduled:flags.8?true id:int about:string participants:ChatParticipants chat_photo:flags.2?Photo notify_settings:PeerNotifySettings exported_invite:flags.13?ExportedChatInvite bot_info:flags.3?Vector<BotInfo> pinned_msg_id:flags.6?int folder_id:flags.11?int call:flags.12?InputGroupCall ttl_period:flags.14?int = ChatFull;
channelFull#2548c037 flags:# can_view_participants:flags.3?true can_set_username:flags.6?true can_set_stickers:flags.7?true hidden_prehistory:flags.10?true can_set_location:flags.16?true has_scheduled:flags.19?true can_view_stats:flags.20?true blocked:flags.22?true id:int about:string participants_count:flags.0?int admins_count:flags.1?int kicked_count:flags.2?int banned_count:flags.2?int online_count:flags.13?int read_inbox_max_id:int read_outbox_max_id:int unread_count:int chat_photo:Photo notify_settings:PeerNotifySettings exported_invite:flags.23?ExportedChatInvite bot_info:Vector<BotInfo> migrated_from_chat_id:flags.4?int migrated_from_max_id:flags.4?int pinned_msg_id:flags.5?int stickerset:flags.8?StickerSet available_min_id:flags.9?int folder_id:flags.11?int linked_chat_id:flags.14?int location:flags.15?ChannelLocation slowmode_seconds:flags.17?int slowmode_next_send_date:flags.18?int stats_dc:flags.12?int pts:int call:flags.21?InputGroupCall ttl_period:flags.24?int pending_suggestions:flags.25?Vector<string> = ChatFull;
chatFull#8a1e2983 flags:# can_set_username:flags.7?true has_scheduled:flags.8?true id:int about:string participants:ChatParticipants chat_photo:flags.2?Photo notify_settings:PeerNotifySettings exported_invite:flags.13?ExportedChatInvite bot_info:flags.3?Vector<BotInfo> pinned_msg_id:flags.6?int folder_id:flags.11?int call:flags.12?InputGroupCall ttl_period:flags.14?int groupcall_default_join_as:flags.15?Peer = ChatFull;
channelFull#548c3f93 flags:# can_view_participants:flags.3?true can_set_username:flags.6?true can_set_stickers:flags.7?true hidden_prehistory:flags.10?true can_set_location:flags.16?true has_scheduled:flags.19?true can_view_stats:flags.20?true blocked:flags.22?true id:int about:string participants_count:flags.0?int admins_count:flags.1?int kicked_count:flags.2?int banned_count:flags.2?int online_count:flags.13?int read_inbox_max_id:int read_outbox_max_id:int unread_count:int chat_photo:Photo notify_settings:PeerNotifySettings exported_invite:flags.23?ExportedChatInvite bot_info:Vector<BotInfo> migrated_from_chat_id:flags.4?int migrated_from_max_id:flags.4?int pinned_msg_id:flags.5?int stickerset:flags.8?StickerSet available_min_id:flags.9?int folder_id:flags.11?int linked_chat_id:flags.14?int location:flags.15?ChannelLocation slowmode_seconds:flags.17?int slowmode_next_send_date:flags.18?int stats_dc:flags.12?int pts:int call:flags.21?InputGroupCall ttl_period:flags.24?int pending_suggestions:flags.25?Vector<string> groupcall_default_join_as:flags.26?Peer = ChatFull;
chatParticipant#c8d7493e user_id:int inviter_id:int date:int = ChatParticipant;
chatParticipantCreator#da13538a user_id:int = ChatParticipant;
@@ -138,7 +139,7 @@ chatParticipantsForbidden#fc900c2b flags:# chat_id:int self_participant:flags.0?
chatParticipants#3f460fed chat_id:int participants:Vector<ChatParticipant> version:int = ChatParticipants;
chatPhotoEmpty#37c1011c = ChatPhoto;
chatPhoto#d20b9f3c flags:# has_video:flags.0?true photo_small:FileLocation photo_big:FileLocation dc_id:int = ChatPhoto;
chatPhoto#1c6e1c11 flags:# has_video:flags.0?true photo_id:long stripped_thumb:flags.1?bytes dc_id:int = ChatPhoto;
messageEmpty#90a6ca84 flags:# id:int peer_id:flags.0?Peer = Message;
message#bce383d2 flags:# out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true post:flags.14?true from_scheduled:flags.18?true legacy:flags.19?true edit_hide:flags.21?true pinned:flags.24?true id:int from_id:flags.8?Peer peer_id:Peer fwd_from:flags.2?MessageFwdHeader via_bot_id:flags.11?int reply_to:flags.3?MessageReplyHeader date:int message:string media:flags.9?MessageMedia reply_markup:flags.6?ReplyMarkup entities:flags.7?Vector<MessageEntity> views:flags.10?int forwards:flags.10?int replies:flags.23?MessageReplies edit_date:flags.15?int post_author:flags.16?string grouped_id:flags.17?long restriction_reason:flags.22?Vector<RestrictionReason> ttl_period:flags.25?int = Message;
@@ -185,6 +186,7 @@ messageActionGeoProximityReached#98e0d697 from_id:Peer to_id:Peer distance:int =
messageActionGroupCall#7a0d7f42 flags:# call:InputGroupCall duration:flags.0?int = MessageAction;
messageActionInviteToGroupCall#76b9f11a call:InputGroupCall users:Vector<int> = MessageAction;
messageActionSetMessagesTTL#aa1afbfd period:int = MessageAction;
messageActionGroupCallScheduled#b3a07661 call:InputGroupCall schedule_date:int = MessageAction;
dialog#2c171f72 flags:# pinned:flags.2?true unread_mark:flags.3?true peer:Peer top_message:int read_inbox_max_id:int read_outbox_max_id:int unread_count:int unread_mentions_count:int notify_settings:PeerNotifySettings pts:flags.0?int draft:flags.1?DraftMessage folder_id:flags.4?int = Dialog;
dialogFolder#71bd134c flags:# pinned:flags.2?true folder:Folder peer:Peer top_message:int unread_muted_peers_count:int unread_unmuted_peers_count:int unread_muted_messages_count:int unread_unmuted_messages_count:int = Dialog;
@@ -193,10 +195,10 @@ photoEmpty#2331b22d id:long = Photo;
photo#fb197a65 flags:# has_stickers:flags.0?true id:long access_hash:long file_reference:bytes date:int sizes:Vector<PhotoSize> video_sizes:flags.1?Vector<VideoSize> dc_id:int = Photo;
photoSizeEmpty#e17e23c type:string = PhotoSize;
photoSize#77bfb61b type:string location:FileLocation w:int h:int size:int = PhotoSize;
photoCachedSize#e9a734fa type:string location:FileLocation w:int h:int bytes:bytes = PhotoSize;
photoSize#75c78e60 type:string w:int h:int size:int = PhotoSize;
photoCachedSize#21e1ad6 type:string w:int h:int bytes:bytes = PhotoSize;
photoStrippedSize#e0b0bc2e type:string bytes:bytes = PhotoSize;
photoSizeProgressive#5aa86a51 type:string location:FileLocation w:int h:int sizes:Vector<int> = PhotoSize;
photoSizeProgressive#fa3efb95 type:string w:int h:int sizes:Vector<int> = PhotoSize;
photoPathSize#d8214d41 type:string bytes:bytes = PhotoSize;
geoPointEmpty#1117dd5f = GeoPoint;
@@ -286,7 +288,7 @@ updateNewMessage#1f2b0afd message:Message pts:int pts_count:int = Update;
updateMessageID#4e90bfd6 id:int random_id:long = Update;
updateDeleteMessages#a20db0e5 messages:Vector<int> pts:int pts_count:int = Update;
updateUserTyping#5c486927 user_id:int action:SendMessageAction = Update;
updateChatUserTyping#9a65ea1f chat_id:int user_id:int action:SendMessageAction = Update;
updateChatUserTyping#86cadb6c chat_id:int from_id:Peer action:SendMessageAction = Update;
updateChatParticipants#7761198 participants:ChatParticipants = Update;
updateUserStatus#1bfbd823 user_id:int status:UserStatus = Update;
updateUserName#a7332b73 user_id:int first_name:string last_name:string username:string = Update;
@@ -363,16 +365,16 @@ updateChannelMessageForwards#6e8a84df channel_id:int id:int forwards:int = Updat
updateReadChannelDiscussionInbox#1cc7de54 flags:# channel_id:int top_msg_id:int read_max_id:int broadcast_id:flags.0?int broadcast_post:flags.0?int = Update;
updateReadChannelDiscussionOutbox#4638a26c channel_id:int top_msg_id:int read_max_id:int = Update;
updatePeerBlocked#246a4b22 peer_id:Peer blocked:Bool = Update;
updateChannelUserTyping#ff2abe9f flags:# channel_id:int top_msg_id:flags.0?int user_id:int action:SendMessageAction = Update;
updateChannelUserTyping#6b171718 flags:# channel_id:int top_msg_id:flags.0?int from_id:Peer action:SendMessageAction = Update;
updatePinnedMessages#ed85eab5 flags:# pinned:flags.0?true peer:Peer messages:Vector<int> pts:int pts_count:int = Update;
updatePinnedChannelMessages#8588878b flags:# pinned:flags.0?true channel_id:int messages:Vector<int> pts:int pts_count:int = Update;
updateChat#1330a196 chat_id:int = Update;
updateGroupCallParticipants#f2ebdb4e call:InputGroupCall participants:Vector<GroupCallParticipant> version:int = Update;
updateGroupCall#a45eb99b chat_id:int call:GroupCall = Update;
updatePeerHistoryTTL#bb9bb9a5 flags:# peer:Peer ttl_period:flags.0?int = Update;
updateChatParticipant#609a6ed4 flags:# chat_id:int date:int user_id:int prev_participant:flags.0?ChatParticipant new_participant:flags.1?ChatParticipant qts:int = Update;
updateChannelParticipant#65d2b464 flags:# channel_id:int date:int user_id:int prev_participant:flags.0?ChannelParticipant new_participant:flags.1?ChannelParticipant qts:int = Update;
updateBotStopped#30ec6ebc user_id:int stopped:Bool qts:int = Update;
updateChatParticipant#f3b3781f flags:# chat_id:int date:int actor_id:int user_id:int prev_participant:flags.0?ChatParticipant new_participant:flags.1?ChatParticipant invite:flags.2?ExportedChatInvite qts:int = Update;
updateChannelParticipant#7fecb1ec flags:# channel_id:int date:int actor_id:int user_id:int prev_participant:flags.0?ChannelParticipant new_participant:flags.1?ChannelParticipant invite:flags.2?ExportedChatInvite qts:int = Update;
updateBotStopped#7f9488a user_id:int date:int stopped:Bool qts:int = Update;
updates.state#a56c2a3e pts:int qts:int date:int seq:int unread_count:int = updates.State;
@@ -553,7 +555,7 @@ inputStickerSetShortName#861cc8a0 short_name:string = InputStickerSet;
inputStickerSetAnimatedEmoji#28703c8 = InputStickerSet;
inputStickerSetDice#e67f520e emoticon:string = InputStickerSet;
stickerSet#40e237a8 flags:# archived:flags.1?true official:flags.2?true masks:flags.3?true animated:flags.5?true installed_date:flags.0?int id:long access_hash:long title:string short_name:string thumbs:flags.4?Vector<PhotoSize> thumb_dc_id:flags.4?int count:int hash:int = StickerSet;
stickerSet#d7df217a flags:# archived:flags.1?true official:flags.2?true masks:flags.3?true animated:flags.5?true installed_date:flags.0?int id:long access_hash:long title:string short_name:string thumbs:flags.4?Vector<PhotoSize> thumb_dc_id:flags.4?int thumb_version:flags.4?int count:int hash:int = StickerSet;
messages.stickerSet#b60a24a6 set:StickerSet packs:Vector<StickerPack> documents:Vector<Document> = messages.StickerSet;
@@ -619,8 +621,8 @@ channelParticipant#15ebac1d user_id:int date:int = ChannelParticipant;
channelParticipantSelf#a3289a6d user_id:int inviter_id:int date:int = ChannelParticipant;
channelParticipantCreator#447dca4b flags:# user_id:int admin_rights:ChatAdminRights rank:flags.0?string = ChannelParticipant;
channelParticipantAdmin#ccbebbaf flags:# can_edit:flags.0?true self:flags.1?true user_id:int inviter_id:flags.1?int promoted_by:int date:int admin_rights:ChatAdminRights rank:flags.2?string = ChannelParticipant;
channelParticipantBanned#1c0facaf flags:# left:flags.0?true user_id:int kicked_by:int date:int banned_rights:ChatBannedRights = ChannelParticipant;
channelParticipantLeft#c3c6796b user_id:int = ChannelParticipant;
channelParticipantBanned#50a1dfd6 flags:# left:flags.0?true peer:Peer kicked_by:int date:int banned_rights:ChatBannedRights = ChannelParticipant;
channelParticipantLeft#1b03f006 peer:Peer = ChannelParticipant;
channelParticipantsRecent#de3f3c79 = ChannelParticipantsFilter;
channelParticipantsAdmins#b4608969 = ChannelParticipantsFilter;
@@ -631,10 +633,10 @@ channelParticipantsSearch#656ac4b q:string = ChannelParticipantsFilter;
channelParticipantsContacts#bb6ae88d q:string = ChannelParticipantsFilter;
channelParticipantsMentions#e04b5ceb flags:# q:flags.0?string top_msg_id:flags.1?int = ChannelParticipantsFilter;
channels.channelParticipants#f56ee2a8 count:int participants:Vector<ChannelParticipant> users:Vector<User> = channels.ChannelParticipants;
channels.channelParticipants#9ab0feaf count:int participants:Vector<ChannelParticipant> chats:Vector<Chat> users:Vector<User> = channels.ChannelParticipants;
channels.channelParticipantsNotModified#f0173fe9 = channels.ChannelParticipants;
channels.channelParticipant#d0d9b163 participant:ChannelParticipant users:Vector<User> = channels.ChannelParticipant;
channels.channelParticipant#dfb80317 participant:ChannelParticipant chats:Vector<Chat> users:Vector<User> = channels.ChannelParticipant;
help.termsOfService#780a0310 flags:# popup:flags.0?true id:DataJSON text:string entities:Vector<MessageEntity> min_age_confirm:flags.1?int = help.TermsOfService;
@@ -647,6 +649,7 @@ inputBotInlineMessageMediaGeo#96929a85 flags:# geo_point:InputGeoPoint heading:f
inputBotInlineMessageMediaVenue#417bbf11 flags:# geo_point:InputGeoPoint title:string address:string provider:string venue_id:string venue_type:string reply_markup:flags.2?ReplyMarkup = InputBotInlineMessage;
inputBotInlineMessageMediaContact#a6edbffd flags:# phone_number:string first_name:string last_name:string vcard:string reply_markup:flags.2?ReplyMarkup = InputBotInlineMessage;
inputBotInlineMessageGame#4b425864 flags:# reply_markup:flags.2?ReplyMarkup = InputBotInlineMessage;
inputBotInlineMessageMediaInvoice#d5348d85 flags:# multiple_allowed:flags.1?true can_forward:flags.3?true title:string description:string photo:flags.0?InputWebDocument invoice:Invoice payload:bytes provider:string provider_data:DataJSON start_param:string reply_markup:flags.2?ReplyMarkup = InputBotInlineMessage;
inputBotInlineResult#88bf9319 flags:# id:string type:string title:flags.1?string description:flags.2?string url:flags.3?string thumb:flags.4?InputWebDocument content:flags.5?InputWebDocument send_message:InputBotInlineMessage = InputBotInlineResult;
inputBotInlineResultPhoto#a8d864a7 id:string type:string photo:InputPhoto send_message:InputBotInlineMessage = InputBotInlineResult;
@@ -658,6 +661,7 @@ botInlineMessageText#8c7f65e2 flags:# no_webpage:flags.0?true message:string ent
botInlineMessageMediaGeo#51846fd flags:# geo:GeoPoint heading:flags.0?int period:flags.1?int proximity_notification_radius:flags.3?int reply_markup:flags.2?ReplyMarkup = BotInlineMessage;
botInlineMessageMediaVenue#8a86659c flags:# geo:GeoPoint title:string address:string provider:string venue_id:string venue_type:string reply_markup:flags.2?ReplyMarkup = BotInlineMessage;
botInlineMessageMediaContact#18d1cdc2 flags:# phone_number:string first_name:string last_name:string vcard:string reply_markup:flags.2?ReplyMarkup = BotInlineMessage;
botInlineMessageMediaInvoice#354a9b09 flags:# shipping_address_requested:flags.1?true test:flags.3?true title:string description:string photo:flags.0?WebDocument currency:string total_amount:long reply_markup:flags.2?ReplyMarkup = BotInlineMessage;
botInlineResult#11965f3a flags:# id:string type:string title:flags.1?string description:flags.2?string url:flags.3?string thumb:flags.4?WebDocument content:flags.5?WebDocument send_message:BotInlineMessage = BotInlineResult;
botInlineMediaResult#17db940b flags:# id:string type:string photo:flags.0?Photo document:flags.1?Document title:flags.2?string description:flags.3?string send_message:BotInlineMessage = BotInlineResult;
@@ -791,7 +795,7 @@ dataJSON#7d748d04 data:string = DataJSON;
labeledPrice#cb296bf8 label:string amount:long = LabeledPrice;
invoice#c30aa358 flags:# test:flags.0?true name_requested:flags.1?true phone_requested:flags.2?true email_requested:flags.3?true shipping_address_requested:flags.4?true flexible:flags.5?true phone_to_provider:flags.6?true email_to_provider:flags.7?true currency:string prices:Vector<LabeledPrice> = Invoice;
invoice#cd886e0 flags:# test:flags.0?true name_requested:flags.1?true phone_requested:flags.2?true email_requested:flags.3?true shipping_address_requested:flags.4?true flexible:flags.5?true phone_to_provider:flags.6?true email_to_provider:flags.7?true currency:string prices:Vector<LabeledPrice> max_tip_amount:flags.8?long suggested_tip_amounts:flags.8?Vector<long> = Invoice;
paymentCharge#ea02c27e id:string provider_charge_id:string = PaymentCharge;
@@ -811,14 +815,14 @@ inputWebFileGeoPointLocation#9f2221c9 geo_point:InputGeoPoint access_hash:long w
upload.webFile#21e753bc size:int mime_type:string file_type:storage.FileType mtime:int bytes:bytes = upload.WebFile;
payments.paymentForm#3f56aea3 flags:# can_save_credentials:flags.2?true password_missing:flags.3?true bot_id:int invoice:Invoice provider_id:int url:string native_provider:flags.4?string native_params:flags.4?DataJSON saved_info:flags.0?PaymentRequestedInfo saved_credentials:flags.1?PaymentSavedCredentials users:Vector<User> = payments.PaymentForm;
payments.paymentForm#8d0b2415 flags:# can_save_credentials:flags.2?true password_missing:flags.3?true form_id:long bot_id:int invoice:Invoice provider_id:int url:string native_provider:flags.4?string native_params:flags.4?DataJSON saved_info:flags.0?PaymentRequestedInfo saved_credentials:flags.1?PaymentSavedCredentials users:Vector<User> = payments.PaymentForm;
payments.validatedRequestedInfo#d1451883 flags:# id:flags.0?string shipping_options:flags.1?Vector<ShippingOption> = payments.ValidatedRequestedInfo;
payments.paymentResult#4e5f810d updates:Updates = payments.PaymentResult;
payments.paymentVerificationNeeded#d8411139 url:string = payments.PaymentResult;
payments.paymentReceipt#500911e1 flags:# date:int bot_id:int invoice:Invoice provider_id:int info:flags.0?PaymentRequestedInfo shipping:flags.1?ShippingOption currency:string total_amount:long credentials_title:string users:Vector<User> = payments.PaymentReceipt;
payments.paymentReceipt#10b555d0 flags:# date:int bot_id:int provider_id:int title:string description:string photo:flags.2?WebDocument invoice:Invoice info:flags.0?PaymentRequestedInfo shipping:flags.1?ShippingOption tip_amount:flags.3?long currency:string total_amount:long credentials_title:string users:Vector<User> = payments.PaymentReceipt;
payments.savedInfo#fb8fe43c flags:# has_saved_credentials:flags.1?true saved_info:flags.0?PaymentRequestedInfo = payments.SavedInfo;
@@ -1087,8 +1091,6 @@ emojiURL#a575739d url:string = EmojiURL;
emojiLanguage#b3fb5361 lang_code:string = EmojiLanguage;
fileLocationToBeDeprecated#bc7fc6cd volume_id:long local_id:int = FileLocation;
folder#ff544e65 flags:# autofill_new_broadcasts:flags.0?true autofill_public_groups:flags.1?true autofill_new_correspondents:flags.2?true id:int title:string photo:flags.3?ChatPhoto = Folder;
inputFolderPeer#fbd2c296 peer:InputPeer folder_id:int = InputFolderPeer;
@@ -1168,7 +1170,7 @@ stats.broadcastStats#bdf78394 period:StatsDateRangeDays followers:StatsAbsValueA
help.promoDataEmpty#98f6ac75 expires:int = help.PromoData;
help.promoData#8c39793f flags:# proxy:flags.0?true expires:int peer:Peer chats:Vector<Chat> users:Vector<User> psa_type:flags.1?string psa_message:flags.2?string = help.PromoData;
videoSize#e831c556 flags:# type:string location:FileLocation w:int h:int size:int video_start_ts:flags.0?double = VideoSize;
videoSize#de33b094 flags:# type:string w:int h:int size:int video_start_ts:flags.0?double = VideoSize;
statsGroupTopPoster#18f3d0f7 user_id:int messages:int avg_chars:int = StatsGroupTopPoster;
@@ -1202,15 +1204,15 @@ peerBlocked#e8fd8014 peer_id:Peer date:int = PeerBlocked;
stats.messageStats#8999f295 views_graph:StatsGraph = stats.MessageStats;
groupCallDiscarded#7780bcb4 id:long access_hash:long duration:int = GroupCall;
groupCall#55903081 flags:# join_muted:flags.1?true can_change_join_muted:flags.2?true id:long access_hash:long participants_count:int params:flags.0?DataJSON version:int = GroupCall;
groupCall#c95c6654 flags:# join_muted:flags.1?true can_change_join_muted:flags.2?true join_date_asc:flags.6?true schedule_start_subscribed:flags.8?true id:long access_hash:long participants_count:int params:flags.0?DataJSON title:flags.3?string stream_dc_id:flags.4?int record_start_date:flags.5?int schedule_date:flags.7?int version:int = GroupCall;
inputGroupCall#d8aa840f id:long access_hash:long = InputGroupCall;
groupCallParticipant#64c62a15 flags:# muted:flags.0?true left:flags.1?true can_self_unmute:flags.2?true just_joined:flags.4?true versioned:flags.5?true min:flags.8?true muted_by_you:flags.9?true volume_by_admin:flags.10?true user_id:int date:int active_date:flags.3?int source:int volume:flags.7?int = GroupCallParticipant;
groupCallParticipant#b96b25ee flags:# muted:flags.0?true left:flags.1?true can_self_unmute:flags.2?true just_joined:flags.4?true versioned:flags.5?true min:flags.8?true muted_by_you:flags.9?true volume_by_admin:flags.10?true self:flags.12?true peer:Peer date:int active_date:flags.3?int source:int volume:flags.7?int about:flags.11?string raise_hand_rating:flags.13?long params:flags.6?DataJSON = GroupCallParticipant;
phone.groupCall#66ab0bfc call:GroupCall participants:Vector<GroupCallParticipant> participants_next_offset:string users:Vector<User> = phone.GroupCall;
phone.groupCall#9e727aad call:GroupCall participants:Vector<GroupCallParticipant> participants_next_offset:string chats:Vector<Chat> users:Vector<User> = phone.GroupCall;
phone.groupParticipants#9cfeb92d count:int participants:Vector<GroupCallParticipant> next_offset:string users:Vector<User> version:int = phone.GroupParticipants;
phone.groupParticipants#f47751b6 count:int participants:Vector<GroupCallParticipant> next_offset:string chats:Vector<Chat> users:Vector<User> version:int = phone.GroupParticipants;
inlineQueryPeerTypeSameBotPM#3081ed9d = InlineQueryPeerType;
inlineQueryPeerTypePM#833c0fac = InlineQueryPeerType;
@@ -1237,6 +1239,12 @@ chatAdminWithInvites#dfd2330f admin_id:int invites_count:int revoked_invites_cou
messages.chatAdminsWithInvites#b69b72d7 admins:Vector<ChatAdminWithInvites> users:Vector<User> = messages.ChatAdminsWithInvites;
messages.checkedHistoryImportPeer#a24de717 confirm_text:string = messages.CheckedHistoryImportPeer;
phone.joinAsPeers#afe5623f peers:Vector<Peer> chats:Vector<Chat> users:Vector<User> = phone.JoinAsPeers;
phone.exportedGroupCallInvite#204bd158 link:string = phone.ExportedGroupCallInvite;
---functions---
invokeAfterMsg#cb9f372d {X:Type} msg_id:long query:!X = X;
@@ -1469,8 +1477,8 @@ messages.getEmojiKeywordsDifference#1508b6af lang_code:string from_version:int =
messages.getEmojiKeywordsLanguages#4e9963b2 lang_codes:Vector<string> = Vector<EmojiLanguage>;
messages.getEmojiURL#d5b10c26 lang_code:string = EmojiURL;
messages.getSearchCounters#732eef00 peer:InputPeer filters:Vector<MessagesFilter> = Vector<messages.SearchCounter>;
messages.requestUrlAuth#e33f5613 peer:InputPeer msg_id:int button_id:int = UrlAuthResult;
messages.acceptUrlAuth#f729ea98 flags:# write_allowed:flags.0?true peer:InputPeer msg_id:int button_id:int = UrlAuthResult;
messages.requestUrlAuth#198fb446 flags:# peer:flags.1?InputPeer msg_id:flags.1?int button_id:flags.1?int url:flags.2?string = UrlAuthResult;
messages.acceptUrlAuth#b12c7125 flags:# write_allowed:flags.0?true peer:flags.1?InputPeer msg_id:flags.1?int button_id:flags.1?int url:flags.2?string = UrlAuthResult;
messages.hidePeerSettingsBar#4facb138 peer:InputPeer = Bool;
messages.getScheduledHistory#e2c2685b peer:InputPeer hash:int = messages.Messages;
messages.getScheduledMessages#bdbb0464 peer:InputPeer id:Vector<int> = messages.Messages;
@@ -1494,12 +1502,14 @@ messages.initHistoryImport#34090c3b peer:InputPeer file:InputFile media_count:in
messages.uploadImportedMedia#2a862092 peer:InputPeer import_id:long file_name:string media:InputMedia = MessageMedia;
messages.startHistoryImport#b43df344 peer:InputPeer import_id:long = Bool;
messages.getExportedChatInvites#a2b5a3f6 flags:# revoked:flags.3?true peer:InputPeer admin_id:InputUser offset_date:flags.2?int offset_link:flags.2?string limit:int = messages.ExportedChatInvites;
messages.getExportedChatInvite#73746f5c peer:InputPeer link:string = messages.ExportedChatInvite;
messages.editExportedChatInvite#2e4ffbe flags:# revoked:flags.2?true peer:InputPeer link:string expire_date:flags.0?int usage_limit:flags.1?int = messages.ExportedChatInvite;
messages.deleteRevokedExportedChatInvites#56987bd5 peer:InputPeer admin_id:InputUser = Bool;
messages.deleteExportedChatInvite#d464a42b peer:InputPeer link:string = Bool;
messages.getAdminsWithInvites#3920e6ef peer:InputPeer = messages.ChatAdminsWithInvites;
messages.getChatInviteImporters#26fb7289 peer:InputPeer link:string offset_date:int offset_user:InputUser limit:int = messages.ChatInviteImporters;
messages.setHistoryTTL#b80e5fe4 peer:InputPeer period:int = Updates;
messages.checkHistoryImportPeer#5dc60f03 peer:InputPeer = messages.CheckedHistoryImportPeer;
updates.getState#edd4882a = updates.State;
updates.getDifference#25939651 flags:# pts:int pts_total_limit:flags.0?int date:int qts:int = updates.Difference;
@@ -1548,7 +1558,7 @@ channels.deleteUserHistory#d10dd71b channel:InputChannel user_id:InputUser = mes
channels.reportSpam#fe087810 channel:InputChannel user_id:InputUser id:Vector<int> = Bool;
channels.getMessages#ad8c9a23 channel:InputChannel id:Vector<InputMessage> = messages.Messages;
channels.getParticipants#123e05e9 channel:InputChannel filter:ChannelParticipantsFilter offset:int limit:int hash:int = channels.ChannelParticipants;
channels.getParticipant#546dd7a6 channel:InputChannel user_id:InputUser = channels.ChannelParticipant;
channels.getParticipant#a0ab6cc6 channel:InputChannel participant:InputPeer = channels.ChannelParticipant;
channels.getChannels#a7f6bbb id:Vector<InputChannel> = messages.Chats;
channels.getFullChannel#8736a09 channel:InputChannel = messages.ChatFull;
channels.createChannel#3d5fb10f flags:# broadcast:flags.0?true megagroup:flags.1?true for_import:flags.3?true title:string about:string geo_point:flags.2?InputGeoPoint address:flags.2?string = Updates;
@@ -1564,7 +1574,7 @@ channels.deleteChannel#c0111fe3 channel:InputChannel = Updates;
channels.exportMessageLink#e63fadeb flags:# grouped:flags.0?true thread:flags.1?true channel:InputChannel id:int = ExportedMessageLink;
channels.toggleSignatures#1f69b606 channel:InputChannel enabled:Bool = Updates;
channels.getAdminedPublicChannels#f8b036af flags:# by_location:flags.0?true check_limit:flags.1?true = messages.Chats;
channels.editBanned#72796912 channel:InputChannel user_id:InputUser banned_rights:ChatBannedRights = Updates;
channels.editBanned#96e6cd81 channel:InputChannel participant:InputPeer banned_rights:ChatBannedRights = Updates;
channels.getAdminLog#33ddf480 flags:# channel:InputChannel q:string events_filter:flags.0?ChannelAdminLogEventsFilter admins:flags.1?Vector<InputUser> max_id:long min_id:long limit:int = channels.AdminLogResults;
channels.setStickers#ea8ca4f9 channel:InputChannel stickerset:InputStickerSet = Bool;
channels.readMessageContents#eab5dc38 channel:InputChannel id:Vector<int> = Bool;
@@ -1583,10 +1593,10 @@ bots.sendCustomRequest#aa2769ed custom_method:string params:DataJSON = DataJSON;
bots.answerWebhookJSONQuery#e6213f4d query_id:long data:DataJSON = Bool;
bots.setBotCommands#805d46f6 commands:Vector<BotCommand> = Bool;
payments.getPaymentForm#99f09745 msg_id:int = payments.PaymentForm;
payments.getPaymentReceipt#a092a980 msg_id:int = payments.PaymentReceipt;
payments.validateRequestedInfo#770a8e74 flags:# save:flags.0?true msg_id:int info:PaymentRequestedInfo = payments.ValidatedRequestedInfo;
payments.sendPaymentForm#2b8879b3 flags:# msg_id:int requested_info_id:flags.0?string shipping_option_id:flags.1?string credentials:InputPaymentCredentials = payments.PaymentResult;
payments.getPaymentForm#8a333c8d flags:# peer:InputPeer msg_id:int theme_params:flags.0?DataJSON = payments.PaymentForm;
payments.getPaymentReceipt#2478d1cc peer:InputPeer msg_id:int = payments.PaymentReceipt;
payments.validateRequestedInfo#db103170 flags:# save:flags.0?true peer:InputPeer msg_id:int info:PaymentRequestedInfo = payments.ValidatedRequestedInfo;
payments.sendPaymentForm#30c3bc9d flags:# form_id:long peer:InputPeer msg_id:int requested_info_id:flags.0?string shipping_option_id:flags.1?string credentials:InputPaymentCredentials tip_amount:flags.2?long = payments.PaymentResult;
payments.getSavedInfo#227d824b = payments.SavedInfo;
payments.clearSavedInfo#d83d70c1 flags:# credentials:flags.0?true info:flags.1?true = Bool;
payments.getBankCardData#2e79d779 number:string = payments.BankCardData;
@@ -1606,16 +1616,23 @@ phone.discardCall#b2cbc1c0 flags:# video:flags.0?true peer:InputPhoneCall durati
phone.setCallRating#59ead627 flags:# user_initiative:flags.0?true peer:InputPhoneCall rating:int comment:string = Updates;
phone.saveCallDebug#277add7e peer:InputPhoneCall debug:DataJSON = Bool;
phone.sendSignalingData#ff7a9383 peer:InputPhoneCall data:bytes = Bool;
phone.createGroupCall#bd3dabe0 peer:InputPeer random_id:int = Updates;
phone.joinGroupCall#5f9c8e62 flags:# muted:flags.0?true call:InputGroupCall params:DataJSON = Updates;
phone.createGroupCall#48cdc6d8 flags:# peer:InputPeer random_id:int title:flags.0?string schedule_date:flags.1?int = Updates;
phone.joinGroupCall#b132ff7b flags:# muted:flags.0?true call:InputGroupCall join_as:InputPeer invite_hash:flags.1?string params:DataJSON = Updates;
phone.leaveGroupCall#500377f9 call:InputGroupCall source:int = Updates;
phone.editGroupCallMember#a5e76cd8 flags:# muted:flags.0?true call:InputGroupCall user_id:InputUser volume:flags.1?int = Updates;
phone.inviteToGroupCall#7b393160 call:InputGroupCall users:Vector<InputUser> = Updates;
phone.discardGroupCall#7a777135 call:InputGroupCall = Updates;
phone.toggleGroupCallSettings#74bbb43d flags:# call:InputGroupCall join_muted:flags.0?Bool = Updates;
phone.toggleGroupCallSettings#74bbb43d flags:# reset_invite_hash:flags.1?true call:InputGroupCall join_muted:flags.0?Bool = Updates;
phone.getGroupCall#c7cb017 call:InputGroupCall = phone.GroupCall;
phone.getGroupParticipants#c9f1d285 call:InputGroupCall ids:Vector<int> sources:Vector<int> offset:string limit:int = phone.GroupParticipants;
phone.getGroupParticipants#c558d8ab call:InputGroupCall ids:Vector<InputPeer> sources:Vector<int> offset:string limit:int = phone.GroupParticipants;
phone.checkGroupCall#b74a7bea call:InputGroupCall source:int = Bool;
phone.toggleGroupCallRecord#c02a66d7 flags:# start:flags.0?true call:InputGroupCall title:flags.1?string = Updates;
phone.editGroupCallParticipant#d975eb80 flags:# muted:flags.0?true call:InputGroupCall participant:InputPeer volume:flags.1?int raise_hand:flags.2?Bool = Updates;
phone.editGroupCallTitle#1ca6ac0a call:InputGroupCall title:string = Updates;
phone.getGroupCallJoinAs#ef7c213a peer:InputPeer = phone.JoinAsPeers;
phone.exportGroupCallInvite#e6aa647f flags:# can_self_unmute:flags.0?true call:InputGroupCall = phone.ExportedGroupCallInvite;
phone.toggleGroupCallStartSubscription#219c34e6 call:InputGroupCall subscribed:Bool = Updates;
phone.startScheduledGroupCall#5680e342 call:InputGroupCall = Updates;
phone.saveDefaultGroupCallJoinAs#575e1f8c peer:InputPeer join_as:InputPeer = Bool;
langpack.getLangPack#f2f2330a lang_pack:string lang_code:string = LangPackDifference;
langpack.getStrings#efea3803 lang_pack:string lang_code:string keys:Vector<string> = Vector<LangPackString>;
@@ -1632,4 +1649,4 @@ stats.getMegagroupStats#dcdf8607 flags:# dark:flags.0?true channel:InputChannel
stats.getMessagePublicForwards#5630281b channel:InputChannel msg_id:int offset_rate:int offset_peer:InputPeer offset_id:int limit:int = messages.Messages;
stats.getMessageStats#b6e0a3f5 flags:# dark:flags.0?true channel:InputChannel msg_id:int = stats.MessageStats;
// LAYER 124
// LAYER 128

View File

@@ -9,7 +9,7 @@
<Identity Name="TelegramMessengerLLP.TelegramDesktop"
ProcessorArchitecture="ARCHITECTURE"
Publisher="CN=536BC709-8EE1-4478-AF22-F0F0F26FF64A"
Version="2.6.1.0" />
Version="2.7.2.0" />
<Properties>
<DisplayName>Telegram Desktop</DisplayName>
<PublisherDisplayName>Telegram Messenger LLP</PublisherDisplayName>

View File

@@ -44,8 +44,8 @@ IDI_ICON1 ICON "..\\art\\icon256.ico"
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 2,6,1,0
PRODUCTVERSION 2,6,1,0
FILEVERSION 2,7,2,0
PRODUCTVERSION 2,7,2,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -62,10 +62,10 @@ BEGIN
BEGIN
VALUE "CompanyName", "Telegram FZ-LLC"
VALUE "FileDescription", "Telegram Desktop"
VALUE "FileVersion", "2.6.1.0"
VALUE "FileVersion", "2.7.2.0"
VALUE "LegalCopyright", "Copyright (C) 2014-2021"
VALUE "ProductName", "Telegram Desktop"
VALUE "ProductVersion", "2.6.1.0"
VALUE "ProductVersion", "2.7.2.0"
END
END
BLOCK "VarFileInfo"

View File

@@ -35,8 +35,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 2,6,1,0
PRODUCTVERSION 2,6,1,0
FILEVERSION 2,7,2,0
PRODUCTVERSION 2,7,2,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -53,10 +53,10 @@ BEGIN
BEGIN
VALUE "CompanyName", "Telegram FZ-LLC"
VALUE "FileDescription", "Telegram Desktop Updater"
VALUE "FileVersion", "2.6.1.0"
VALUE "FileVersion", "2.7.2.0"
VALUE "LegalCopyright", "Copyright (C) 2014-2021"
VALUE "ProductName", "Telegram Desktop"
VALUE "ProductVersion", "2.6.1.0"
VALUE "ProductVersion", "2.7.2.0"
END
END
BLOCK "VarFileInfo"

View File

@@ -55,7 +55,7 @@ void AttachedStickers::request(
Ui::show(
Box<StickerSetBox>(strongController, setId),
Ui::LayerOption::KeepOther);
}).fail([=](const RPCError &error) {
}).fail([=](const MTP::Error &error) {
_requestId = 0;
Ui::show(Box<InformBox>(tr::lng_stickers_not_found(tr::now)));
}).send();

View File

@@ -46,9 +46,9 @@ Authorizations::Entry ParseEntry(const MTPDauthorization &data) {
return version;
}();
result.name = QString("%1%2")
.arg(appName)
.arg(appVer.isEmpty() ? QString() : (' ' + appVer));
result.name = QString("%1%2").arg(
appName,
appVer.isEmpty() ? QString() : (' ' + appVer));
const auto country = qs(data.vcountry());
const auto platform = qs(data.vplatform());
@@ -61,10 +61,10 @@ Authorizations::Entry ParseEntry(const MTPDauthorization &data) {
result.activeTime = data.vdate_active().v
? data.vdate_active().v
: data.vdate_created().v;
result.info = QString("%1, %2%3")
.arg(qs(data.vdevice_model()))
.arg(platform.isEmpty() ? QString() : platform + ' ')
.arg(qs(data.vsystem_version()));
result.info = QString("%1, %2%3").arg(
qs(data.vdevice_model()),
platform.isEmpty() ? QString() : platform + ' ',
qs(data.vsystem_version()));
result.ip = qs(data.vip())
+ (country.isEmpty()
? QString()
@@ -107,12 +107,12 @@ void Authorizations::reload() {
result.match([&](const MTPDaccount_authorizations &auths) {
_list = (
auths.vauthorizations().v
) | ranges::view::transform([](const MTPAuthorization &d) {
) | ranges::views::transform([](const MTPAuthorization &d) {
return ParseEntry(d.c_authorization());
}) | ranges::to<List>;
_listChanges.fire({});
});
}).fail([=](const RPCError &error) {
}).fail([=](const MTP::Error &error) {
_requestId = 0;
}).send();
}
@@ -123,7 +123,7 @@ void Authorizations::cancelCurrentRequest() {
void Authorizations::requestTerminate(
Fn<void(const MTPBool &result)> &&done,
Fn<void(const RPCError &error)> &&fail,
Fn<void(const MTP::Error &error)> &&fail,
std::optional<uint64> hash) {
const auto send = [&](auto request) {
_api.request(

View File

@@ -30,7 +30,7 @@ public:
void cancelCurrentRequest();
void requestTerminate(
Fn<void(const MTPBool &result)> &&done,
Fn<void(const RPCError &error)> &&fail,
Fn<void(const MTP::Error &error)> &&fail,
std::optional<uint64> hash = std::nullopt);
[[nodiscard]] crl::time lastReceivedTime();

View File

@@ -34,7 +34,7 @@ void SendBotCallbackData(
int row,
int column,
std::optional<MTPInputCheckPasswordSRP> password = std::nullopt,
Fn<void(const RPCError &)> handleError = nullptr) {
Fn<void(const MTP::Error &)> handleError = nullptr) {
if (!IsServerMsgId(item->id)) {
return;
}
@@ -115,7 +115,7 @@ void SendBotCallbackData(
Ui::hideLayer();
}
});
}).fail([=](const RPCError &error) {
}).fail([=](const MTP::Error &error) {
const auto item = owner->message(fullId);
if (!item) {
return;
@@ -170,7 +170,7 @@ void SendBotCallbackDataWithPassword(
return;
}
api->reloadPasswordState();
SendBotCallbackData(item, row, column, MTP_inputCheckPasswordEmpty(), [=](const RPCError &error) {
SendBotCallbackData(item, row, column, MTP_inputCheckPasswordEmpty(), [=](const MTP::Error &error) {
auto box = PrePasswordErrorBox(
error,
session,
@@ -212,7 +212,7 @@ void SendBotCallbackDataWithPassword(
return;
}
if (const auto item = owner->message(fullId)) {
SendBotCallbackData(item, row, column, result.result, [=](const RPCError &error) {
SendBotCallbackData(item, row, column, result.result, [=](const MTP::Error &error) {
if (*box) {
(*box)->handleCustomCheckError(error);
}

View File

@@ -75,7 +75,7 @@ void CheckChatInvite(
}
}
});
}, [=](const RPCError &error) {
}, [=](const MTP::Error &error) {
if (error.code() != 400) {
return;
}

View File

@@ -33,6 +33,7 @@ struct SendAction {
MsgId replyTo = 0;
bool clearDraft = true;
bool generateLocal = true;
MsgId replaceMediaOf = 0;
};
struct MessageToSend {

View File

@@ -17,7 +17,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "history/history_item.h"
#include "lang/lang_keys.h"
#include "main/main_session.h"
#include "mtproto/mtproto_rpc_sender.h"
#include "mtproto/mtproto_response.h"
namespace Api {
namespace {
@@ -131,7 +131,7 @@ void EditMessageWithUploadedMedia(
item->setIsLocalUpdateMedia(false);
}
};
const auto fail = [=](const RPCError &error) {
const auto fail = [=](const MTP::Error &error) {
const auto err = error.type();
const auto session = &item->history()->session();
const auto notModified = (err == u"MESSAGE_NOT_MODIFIED"_q);
@@ -157,7 +157,7 @@ void EditMessageWithUploadedMedia(
void RescheduleMessage(
not_null<HistoryItem*> item,
SendOptions options) {
const auto empty = [](const auto &r) {};
const auto empty = [] {};
EditMessage(item, options, empty, empty);
}
@@ -189,7 +189,7 @@ mtpRequestId EditCaption(
const TextWithEntities &caption,
SendOptions options,
Fn<void(const MTPUpdates &)> done,
Fn<void(const RPCError &)> fail) {
Fn<void(const MTP::Error &)> fail) {
return EditMessage(item, caption, options, done, fail);
}
@@ -198,7 +198,7 @@ mtpRequestId EditTextMessage(
const TextWithEntities &caption,
SendOptions options,
Fn<void(const MTPUpdates &, mtpRequestId requestId)> done,
Fn<void(const RPCError &, mtpRequestId requestId)> fail) {
Fn<void(const MTP::Error &, mtpRequestId requestId)> fail) {
const auto callback = [=](
const auto &result,
Fn<void()> applyUpdates,

View File

@@ -8,7 +8,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#pragma once
class HistoryItem;
class RPCError;
namespace MTP {
class Error;
} // namespace MTP
namespace Api {
@@ -40,13 +43,13 @@ mtpRequestId EditCaption(
const TextWithEntities &caption,
SendOptions options,
Fn<void(const MTPUpdates &)> done,
Fn<void(const RPCError &)> fail);
Fn<void(const MTP::Error &)> fail);
mtpRequestId EditTextMessage(
not_null<HistoryItem*> item,
const TextWithEntities &caption,
SendOptions options,
Fn<void(const MTPUpdates &, mtpRequestId requestId)> done,
Fn<void(const RPCError &, mtpRequestId requestId)> fail);
Fn<void(const MTP::Error &, mtpRequestId requestId)> fail);
} // namespace Api

View File

@@ -33,7 +33,7 @@ void GlobalPrivacy::reload(Fn<void()> callback) {
for (const auto &callback : base::take(_callbacks)) {
callback();
}
}).fail([=](const RPCError &error) {
}).fail([=](const MTP::Error &error) {
_requestId = 0;
for (const auto &callback : base::take(_callbacks)) {
callback();
@@ -86,7 +86,7 @@ void GlobalPrivacy::update(bool archiveAndMute) {
)).done([=](const MTPGlobalPrivacySettings &result) {
_requestId = 0;
apply(result);
}).fail([=](const RPCError &error) {
}).fail([=](const MTP::Error &error) {
_requestId = 0;
}).send();
_archiveAndMute = archiveAndMute;

View File

@@ -51,10 +51,10 @@ JoinedByLinkSlice ParseJoinedByLinkSlice(
owner.processUsers(data.vusers());
result.count = data.vcount().v;
result.users.reserve(data.vimporters().v.size());
for (const auto importer : data.vimporters().v) {
for (const auto &importer : data.vimporters().v) {
importer.match([&](const MTPDchatInviteImporter &data) {
result.users.push_back({
.user = owner.user(data.vuser_id().v),
.user = owner.user(data.vuser_id()),
.date = data.vdate().v,
});
});
@@ -110,7 +110,7 @@ void InviteLinks::performCreate(
callback(link);
}
}
}).fail([=](const RPCError &error) {
}).fail([=](const MTP::Error &error) {
_createCallbacks.erase(peer);
}).send();
}
@@ -282,7 +282,7 @@ void InviteLinks::performEdit(
prepend(peer, admin, data.vnew_invite());
}
});
}).fail([=](const RPCError &error) {
}).fail([=](const MTP::Error &error) {
_editCallbacks.erase(key);
}).send();
}
@@ -344,7 +344,7 @@ void InviteLinks::destroy(
.admin = admin,
.was = key.link,
});
}).fail([=](const RPCError &error) {
}).fail([=](const MTP::Error &error) {
_deleteCallbacks.erase(key);
}).send();
}
@@ -374,7 +374,7 @@ void InviteLinks::destroyAllRevoked(
}
}
_allRevokedDestroyed.fire({ peer, admin });
}).fail([=](const RPCError &error) {
}).fail([=](const MTP::Error &error) {
}).send();
}
@@ -415,7 +415,7 @@ void InviteLinks::requestMyLinks(not_null<PeerData*> peer) {
i->second.count = std::max(slice.count, int(existing.size()));
}
notify(peer);
}).fail([=](const RPCError &error) {
}).fail([=](const MTP::Error &error) {
_firstSliceRequests.remove(peer);
}).send();
_firstSliceRequests.emplace(peer, requestId);
@@ -493,7 +493,7 @@ void InviteLinks::requestJoinedFirstSlice(LinkKey key) {
_firstJoinedRequests.remove(key);
_firstJoined[key] = ParseJoinedByLinkSlice(key.peer, result);
_joinedFirstSliceLoaded.fire_copy(key);
}).fail([=](const RPCError &error) {
}).fail([=](const MTP::Error &error) {
_firstJoinedRequests.remove(key);
}).send();
_firstJoinedRequests.emplace(key, requestId);
@@ -623,7 +623,7 @@ auto InviteLinks::parse(
return invite.match([&](const MTPDchatInviteExported &data) {
return Link{
.link = qs(data.vlink()),
.admin = peer->session().data().user(data.vadmin_id().v),
.admin = peer->session().data().user(data.vadmin_id()),
.date = data.vdate().v,
.startDate = data.vstart_date().value_or_empty(),
.expireDate = data.vexpire_date().value_or_empty(),
@@ -653,7 +653,7 @@ void InviteLinks::requestMoreLinks(
MTP_int(kPerPage)
)).done([=](const MTPmessages_ExportedChatInvites &result) {
done(parseSlice(peer, result));
}).fail([=](const RPCError &error) {
}).fail([=](const MTP::Error &error) {
done(Links());
}).send();
}

View File

@@ -25,7 +25,7 @@ void SelfDestruct::reload() {
result.match([&](const MTPDaccountDaysTTL &data) {
_days = data.vdays().v;
});
}).fail([=](const RPCError &error) {
}).fail([=](const MTP::Error &error) {
_requestId = 0;
}).send();
}
@@ -42,7 +42,7 @@ void SelfDestruct::update(int days) {
MTP_accountDaysTTL(MTP_int(days))
)).done([=](const MTPBool &result) {
_requestId = 0;
}).fail([=](const RPCError &result) {
}).fail([=](const MTP::Error &result) {
_requestId = 0;
}).send();
_days = days;

View File

@@ -65,7 +65,10 @@ void SendProgressManager::update(
SendProgressType type,
int progress) {
const auto peer = history->peer;
if (peer->isSelf() || (peer->isChannel() && !peer->isMegagroup())) {
if (peer->isSelf()
|| (peer->isChannel()
&& !peer->isMegagroup()
&& type != SendProgressType::Speaking)) {
return;
}

View File

@@ -150,7 +150,7 @@ void SendExistingMedia(
)).done([=](const MTPUpdates &result) {
api->applyUpdates(result, randomId);
finish();
}).fail([=](const RPCError &error) {
}).fail([=](const MTP::Error &error) {
if (error.code() == 400
&& error.type().startsWith(qstr("FILE_REFERENCE_"))) {
api->refreshFileReference(origin, [=](const auto &result) {
@@ -324,7 +324,7 @@ bool SendDice(Api::MessageToSend &message) {
)).done([=](const MTPUpdates &result) {
api->applyUpdates(result, randomId);
finish();
}).fail([=](const RPCError &error) {
}).fail([=](const MTP::Error &error) {
api->sendMessageFail(error, peer, randomId, newId);
finish();
}).afterRequest(history->sendRequestId
@@ -344,13 +344,15 @@ void FillMessagePostFlags(
void SendConfirmedFile(
not_null<Main::Session*> session,
const std::shared_ptr<FileLoadResult> &file,
const std::optional<FullMsgId> &oldId) {
const auto isEditing = oldId.has_value();
const std::shared_ptr<FileLoadResult> &file) {
const auto isEditing = file->to.replaceMediaOf != 0;
const auto channelId = peerToChannel(file->to.peer);
const auto newId = oldId.value_or(
FullMsgId(channelId, session->data().nextLocalMessageId()));
const auto newId = FullMsgId(
channelId,
isEditing
? file->to.replaceMediaOf
: session->data().nextLocalMessageId());
auto groupId = file->album ? file->album->groupId : uint64(0);
if (file->album) {
const auto proj = [](const SendingAlbum::Item &item) {
@@ -361,7 +363,6 @@ void SendConfirmedFile(
it->msgId = newId;
}
file->edit = isEditing;
session->uploader().upload(newId, file);
const auto itemToEdit = isEditing

View File

@@ -34,7 +34,6 @@ void FillMessagePostFlags(
void SendConfirmedFile(
not_null<Main::Session*> session,
const std::shared_ptr<FileLoadResult> &file,
const std::optional<FullMsgId> &oldId);
const std::shared_ptr<FileLoadResult> &file);
} // namespace Api

View File

@@ -36,7 +36,7 @@ void SensitiveContent::reload() {
_enabled = data.is_sensitive_enabled();
_canChange = data.is_sensitive_can_change();
});
}).fail([=](const RPCError &error) {
}).fail([=](const MTP::Error &error) {
_requestId = 0;
}).send();
}
@@ -63,7 +63,7 @@ void SensitiveContent::update(bool enabled) {
MTP_flags(enabled ? Flag::f_sensitive_enabled : Flag(0))
)).done([=](const MTPBool &result) {
_requestId = 0;
}).fail([=](const RPCError &error) {
}).fail([=](const MTP::Error &error) {
_requestId = 0;
}).send();
_enabled = enabled;

View File

@@ -37,7 +37,7 @@ Key ExtractKey(const QString &query) {
const auto params = parse();
const auto channel = params.value("channel");
const auto post = params.value("post").toInt();
return (channel.toInt() && post) ? Key{ channel, post } : Key();
return (channel.toULongLong() && post) ? Key{ channel, post } : Key();
} else if (check.startsWith(qstr("tg://resolve"), Qt::CaseInsensitive)) {
const auto params = parse();
const auto domain = params.value("domain");
@@ -112,12 +112,12 @@ std::optional<HistoryItem*> SingleMessageSearch::performLookupByChannel(
&& received.messageIds.front() == postId) {
_cache.emplace(
_requestKey,
FullMsgId(channel->bareId(), postId));
FullMsgId(peerToChannel(channel->id), postId));
ready();
} else {
fail();
}
}).fail([=](const RPCError &error) {
}).fail([=](const MTP::Error &error) {
fail();
}).send();
@@ -142,7 +142,7 @@ std::optional<HistoryItem*> SingleMessageSearch::performLookupById(
_requestId = _session->api().request(MTPchannels_GetChannels(
MTP_vector<MTPInputChannel>(
1,
MTP_inputChannel(MTP_int(channelId), MTP_long(0)))
MTP_inputChannel(MTP_int(channelId.bare), MTP_long(0))) // #TODO ids
)).done([=](const MTPmessages_Chats &result) {
result.match([&](const auto &data) {
const auto peer = _session->data().processChats(data.vchats());
@@ -154,7 +154,7 @@ std::optional<HistoryItem*> SingleMessageSearch::performLookupById(
fail();
}
});
}).fail([=](const RPCError &error) {
}).fail([=](const MTP::Error &error) {
fail();
}).send();
@@ -198,7 +198,7 @@ std::optional<HistoryItem*> SingleMessageSearch::performLookupByUsername(
fail();
}
});
}).fail([=](const RPCError &error) {
}).fail([=](const MTP::Error &error) {
fail();
}).send();
@@ -212,7 +212,7 @@ std::optional<HistoryItem*> SingleMessageSearch::performLookup(
if (!_requestKey.domainOrId[0].isDigit()) {
return performLookupByUsername(_requestKey.domainOrId, ready);
}
const auto channelId = _requestKey.domainOrId.toInt();
const auto channelId = ChannelId(_requestKey.domainOrId.toULongLong());
return performLookupById(channelId, ready);
}

View File

@@ -35,15 +35,17 @@ EntitiesInText EntitiesFromMTP(
case mtpc_messageEntityMention: { auto &d = entity.c_messageEntityMention(); result.push_back({ EntityType::Mention, d.voffset().v, d.vlength().v }); } break;
case mtpc_messageEntityMentionName: {
const auto &d = entity.c_messageEntityMentionName();
const auto userId = UserId(d.vuser_id());
const auto data = [&] {
if (session) {
if (const auto user = session->data().userLoaded(d.vuser_id().v)) {
if (const auto user = session->data().userLoaded(userId)) {
return MentionNameDataFromFields({
d.vuser_id().v,
user->accessHash() });
userId.bare,
user->accessHash()
});
}
}
return MentionNameDataFromFields(d.vuser_id().v);
return MentionNameDataFromFields(userId.bare);
}();
result.push_back({ EntityType::MentionName, d.voffset().v, d.vlength().v, data });
} break;
@@ -51,10 +53,11 @@ EntitiesInText EntitiesFromMTP(
const auto &d = entity.c_inputMessageEntityMentionName();
const auto data = [&] {
if (session && d.vuser_id().type() == mtpc_inputUserSelf) {
return MentionNameDataFromFields(session->userId());
return MentionNameDataFromFields(session->userId().bare);
} else if (d.vuser_id().type() == mtpc_inputUser) {
auto &user = d.vuser_id().c_inputUser();
return MentionNameDataFromFields({ user.vuser_id().v, user.vaccess_hash().v });
const auto userId = UserId(user.vuser_id());
return MentionNameDataFromFields({ userId.bare, user.vaccess_hash().v });
}
return QString();
}();
@@ -110,7 +113,7 @@ MTPVector<MTPMessageEntity> EntitiesToMTP(
case EntityType::MentionName: {
auto inputUser = [&](const QString &data) -> MTPInputUser {
auto fields = MentionNameDataToFields(data);
if (session && fields.userId == session->userId()) {
if (session && fields.userId == session->userId().bare) {
return MTP_inputUserSelf();
} else if (fields.userId) {
return MTP_inputUser(MTP_int(fields.userId), MTP_long(fields.accessHash));

View File

@@ -33,7 +33,7 @@ void ToggleExistingMedia(
if (mtpIsTrue(result)) {
done();
}
}).fail([=](const RPCError &error) {
}).fail([=](const MTP::Error &error) {
if (error.code() == 400
&& error.type().startsWith(u"FILE_REFERENCE_"_q)) {
auto refreshed = [=](const Data::UpdatedFileReferences &d) {

View File

@@ -131,13 +131,13 @@ bool MentionUsersLoaded(
for (const auto &entity : entities.v) {
auto type = entity.type();
if (type == mtpc_messageEntityMentionName) {
if (!session->data().userLoaded(entity.c_messageEntityMentionName().vuser_id().v)) {
if (!session->data().userLoaded(entity.c_messageEntityMentionName().vuser_id())) {
return false;
}
} else if (type == mtpc_inputMessageEntityMentionName) {
auto &inputUser = entity.c_inputMessageEntityMentionName().vuser_id();
if (inputUser.type() == mtpc_inputUser) {
if (!session->data().userLoaded(inputUser.c_inputUser().vuser_id().v)) {
if (!session->data().userLoaded(inputUser.c_inputUser().vuser_id())) {
return false;
}
}
@@ -157,7 +157,7 @@ DataIsLoadedResult AllDataLoadedForMessage(
}
}
if (const auto viaBotId = message.vvia_bot_id()) {
if (!session->data().userLoaded(viaBotId->v)) {
if (!session->data().userLoaded(*viaBotId)) {
return DataIsLoadedResult::NotLoaded;
}
}
@@ -181,19 +181,19 @@ DataIsLoadedResult AllDataLoadedForMessage(
}
return message.vaction().match(
[&](const MTPDmessageActionChatAddUser &action) {
for (const MTPint &userId : action.vusers().v) {
if (!session->data().userLoaded(userId.v)) {
for (const auto &userId : action.vusers().v) {
if (!session->data().userLoaded(userId)) {
return DataIsLoadedResult::NotLoaded;
}
}
return DataIsLoadedResult::Ok;
}, [&](const MTPDmessageActionChatJoinedByLink &action) {
if (!session->data().userLoaded(action.vinviter_id().v)) {
if (!session->data().userLoaded(action.vinviter_id())) {
return DataIsLoadedResult::NotLoaded;
}
return DataIsLoadedResult::Ok;
}, [&](const MTPDmessageActionChatDeleteUser &action) {
if (!session->data().userLoaded(action.vuser_id().v)) {
if (!session->data().userLoaded(action.vuser_id())) {
return DataIsLoadedResult::NotLoaded;
}
return DataIsLoadedResult::Ok;
@@ -240,16 +240,16 @@ Updates::Updates(not_null<Main::Session*> session)
) | rpl::filter([](not_null<PeerData*> peer) {
return peer->isChat() || peer->isMegagroup();
}) | rpl::start_with_next([=](not_null<PeerData*> peer) {
if (const auto users = _pendingSpeakingCallMembers.take(peer)) {
if (const auto list = _pendingSpeakingCallParticipants.take(peer)) {
if (const auto call = peer->groupCall()) {
for (const auto [userId, when] : *users) {
for (const auto &[participantPeerId, when] : *list) {
call->applyActiveUpdate(
userId,
participantPeerId,
Data::LastSpokeTimes{
.anything = when,
.voice = when
},
peer->owner().userLoaded(userId));
peer->owner().peerLoaded(participantPeerId));
}
}
}
@@ -277,12 +277,32 @@ void Updates::checkLastUpdate(bool afterSleep) {
void Updates::feedUpdateVector(
const MTPVector<MTPUpdate> &updates,
bool skipMessageIds) {
for (const auto &update : updates.v) {
if (skipMessageIds && update.type() == mtpc_updateMessageID) {
SkipUpdatePolicy policy) {
auto list = updates.v;
const auto hasGroupCallParticipantUpdates = ranges::contains(
list,
mtpc_updateGroupCallParticipants,
&MTPUpdate::type);
if (hasGroupCallParticipantUpdates) {
ranges::stable_sort(list, std::less<>(), [](const MTPUpdate &entry) {
if (entry.type() == mtpc_updateGroupCallParticipants) {
return 0;
} else {
return 1;
}
});
} else if (policy == SkipUpdatePolicy::SkipExceptGroupCallParticipants) {
return;
}
for (const auto &entry : std::as_const(list)) {
const auto type = entry.type();
if ((policy == SkipUpdatePolicy::SkipMessageIds
&& type == mtpc_updateMessageID)
|| (policy == SkipUpdatePolicy::SkipExceptGroupCallParticipants
&& type != mtpc_updateGroupCallParticipants)) {
continue;
}
feedUpdate(update);
feedUpdate(entry);
}
session().data().sendHistoryChangeNotifications();
}
@@ -392,17 +412,19 @@ void Updates::feedChannelDifference(
session().data().processMessages(
data.vnew_messages(),
NewMessageType::Unread);
feedUpdateVector(data.vother_updates(), true);
feedUpdateVector(
data.vother_updates(),
SkipUpdatePolicy::SkipMessageIds);
_handlingChannelDifference = false;
}
void Updates::channelDifferenceFail(
not_null<ChannelData*> channel,
const RPCError &error) {
LOG(("RPC Error in getChannelDifference: %1 %2: %3"
).arg(error.code()
).arg(error.type()
).arg(error.description()));
const MTP::Error &error) {
LOG(("RPC Error in getChannelDifference: %1 %2: %3").arg(
QString::number(error.code()),
error.type(),
error.description()));
failDifferenceStartTimerFor(channel);
}
@@ -553,14 +575,14 @@ void Updates::feedDifference(
session().data().processChats(chats);
feedMessageIds(other);
session().data().processMessages(msgs, NewMessageType::Unread);
feedUpdateVector(other, true);
feedUpdateVector(other, SkipUpdatePolicy::SkipMessageIds);
}
void Updates::differenceFail(const RPCError &error) {
LOG(("RPC Error in getDifference: %1 %2: %3"
).arg(error.code()
).arg(error.type()
).arg(error.description()));
void Updates::differenceFail(const MTP::Error &error) {
LOG(("RPC Error in getDifference: %1 %2: %3").arg(
QString::number(error.code()),
error.type(),
error.description()));
failDifferenceStartTimerFor(nullptr);
}
@@ -643,7 +665,7 @@ void Updates::getDifference() {
MTP_int(_updatesQts)
)).done([=](const MTPupdates_Difference &result) {
differenceDone(result);
}).fail([=](const RPCError &error) {
}).fail([=](const MTP::Error &error) {
differenceFail(error);
}).send();
}
@@ -678,7 +700,7 @@ void Updates::getChannelDifference(
MTP_int(kChannelGetDifferenceLimit)
)).done([=](const MTPupdates_ChannelDifference &result) {
channelDifferenceDone(channel, result);
}).fail([=](const RPCError &error) {
}).fail([=](const MTP::Error &error) {
channelDifferenceFail(channel, error);
}).send();
}
@@ -742,7 +764,7 @@ void Updates::channelRangeDifferenceSend(
)).done([=](const MTPupdates_ChannelDifference &result) {
_rangeDifferenceRequests.remove(channel);
channelRangeDifferenceDone(channel, range, result);
}).fail([=](const RPCError &error) {
}).fail([=](const MTP::Error &error) {
_rangeDifferenceRequests.remove(channel);
}).send();
_rangeDifferenceRequests.emplace(channel, requestId);
@@ -810,9 +832,32 @@ void Updates::mtpUpdateReceived(const MTPUpdates &updates) {
if (!requestingDifference()
|| HasForceLogoutNotification(updates)) {
applyUpdates(updates);
} else {
applyGroupCallParticipantUpdates(updates);
}
}
void Updates::applyGroupCallParticipantUpdates(const MTPUpdates &updates) {
updates.match([&](const MTPDupdates &data) {
session().data().processUsers(data.vusers());
session().data().processChats(data.vchats());
feedUpdateVector(
data.vupdates(),
SkipUpdatePolicy::SkipExceptGroupCallParticipants);
}, [&](const MTPDupdatesCombined &data) {
session().data().processUsers(data.vusers());
session().data().processChats(data.vchats());
feedUpdateVector(
data.vupdates(),
SkipUpdatePolicy::SkipExceptGroupCallParticipants);
}, [&](const MTPDupdateShort &data) {
if (data.vupdate().type() == mtpc_updateGroupCallParticipants) {
feedUpdate(data.vupdate());
}
}, [](const auto &) {
});
}
int32 Updates::pts() const {
return _ptsWaiter.current();
}
@@ -862,7 +907,7 @@ void Updates::updateOnline(bool gotOtherOffline) {
MTP_bool(!isOnline)
)).done([=](const MTPBool &result) {
Core::App().quitPreventFinished();
}).fail([=](const RPCError &error) {
}).fail([=](const MTP::Error &error) {
Core::App().quitPreventFinished();
}).send();
}
@@ -915,16 +960,16 @@ bool Updates::isQuitPrevent() {
void Updates::handleSendActionUpdate(
PeerId peerId,
MsgId rootId,
UserId userId,
PeerId fromId,
const MTPSendMessageAction &action) {
const auto history = session().data().historyLoaded(peerId);
if (!history) {
return;
}
const auto peer = history->peer;
const auto user = (userId == session().userId())
const auto from = (fromId == session().userPeerId())
? session().user().get()
: session().data().userLoaded(userId);
: session().data().peerLoaded(fromId);
const auto isSpeakingInCall = (action.type()
== mtpc_speakingInGroupCallAction);
if (isSpeakingInCall) {
@@ -935,9 +980,9 @@ void Updates::handleSendActionUpdate(
const auto now = crl::now();
if (call) {
call->applyActiveUpdate(
userId,
fromId,
Data::LastSpokeTimes{ .anything = now, .voice = now },
user);
from);
} else {
const auto chat = peer->asChat();
const auto channel = peer->asChannel();
@@ -945,13 +990,15 @@ void Updates::handleSendActionUpdate(
? (chat->flags() & MTPDchat::Flag::f_call_active)
: (channel->flags() & MTPDchannel::Flag::f_call_active);
if (active) {
_pendingSpeakingCallMembers.emplace(
peer).first->second[userId] = now;
session().api().requestFullPeer(peer);
_pendingSpeakingCallParticipants.emplace(
peer).first->second[fromId] = now;
if (peerIsUser(fromId)) {
session().api().requestFullPeer(peer);
}
}
}
}
if (!user || user->isSelf()) {
if (!from || !from->isUser() || from->isSelf()) {
return;
}
const auto when = requestingDifference()
@@ -960,7 +1007,7 @@ void Updates::handleSendActionUpdate(
session().data().registerSendAction(
history,
rootId,
user,
from->asUser(),
action,
when);
}
@@ -973,7 +1020,7 @@ void Updates::applyUpdatesNoPtsCheck(const MTPUpdates &updates) {
| MTPDmessage::Flag::f_from_id;
const auto peerUserId = d.is_out()
? d.vuser_id()
: MTP_int(_session->userId());
: MTP_int(_session->userId().bare); // #TODO ids
_session->data().addNewMessage(
MTP_message(
MTP_flags(flags),
@@ -1262,8 +1309,8 @@ void Updates::applyUpdates(
const auto viaBotId = d.vvia_bot_id();
const auto entities = d.ventities();
const auto fwd = d.vfwd_from();
if (!session().data().userLoaded(d.vuser_id().v)
|| (viaBotId && !session().data().userLoaded(viaBotId->v))
if (!session().data().userLoaded(d.vuser_id())
|| (viaBotId && !session().data().userLoaded(*viaBotId))
|| (entities && !MentionUsersLoaded(&session(), *entities))
|| (fwd && !ForwardedInfoDataLoaded(&session(), *fwd))) {
MTP_LOG(0, ("getDifference "
@@ -1279,14 +1326,14 @@ void Updates::applyUpdates(
case mtpc_updateShortChatMessage: {
auto &d = updates.c_updateShortChatMessage();
const auto noFrom = !session().data().userLoaded(d.vfrom_id().v);
const auto chat = session().data().chatLoaded(d.vchat_id().v);
const auto noFrom = !session().data().userLoaded(d.vfrom_id());
const auto chat = session().data().chatLoaded(d.vchat_id());
const auto viaBotId = d.vvia_bot_id();
const auto entities = d.ventities();
const auto fwd = d.vfwd_from();
if (!chat
|| noFrom
|| (viaBotId && !session().data().userLoaded(viaBotId->v))
|| (viaBotId && !session().data().userLoaded(*viaBotId))
|| (entities && !MentionUsersLoaded(&session(), *entities))
|| (fwd && !ForwardedInfoDataLoaded(&session(), *fwd))) {
MTP_LOG(0, ("getDifference "
@@ -1444,7 +1491,7 @@ void Updates::feedUpdate(const MTPUpdate &update) {
case mtpc_updateChannelReadMessagesContents: {
auto &d = update.c_updateChannelReadMessagesContents();
auto channel = session().data().channelLoaded(d.vchannel_id().v);
auto channel = session().data().channelLoaded(d.vchannel_id());
if (!channel) {
if (!_byMinChannelTimer.isActive()) {
// getDifference after timeout.
@@ -1490,7 +1537,7 @@ void Updates::feedUpdate(const MTPUpdate &update) {
case mtpc_updatePinnedChannelMessages: {
auto &d = update.c_updatePinnedChannelMessages();
auto channel = session().data().channelLoaded(d.vchannel_id().v);
auto channel = session().data().channelLoaded(d.vchannel_id());
if (channel && !_handlingChannelDifference) {
if (channel->ptsRequesting()) { // skip global updates while getting channel difference
@@ -1539,22 +1586,6 @@ void Updates::feedUpdate(const MTPUpdate &update) {
}
} break;
//case mtpc_updateReadFeed: { // #feed
// const auto &d = update.c_updateReadFeed();
// const auto feedId = d.vfeed_id().v;
// if (const auto feed = session().data().feedLoaded(feedId)) {
// feed->setUnreadPosition(
// Data::FeedPositionFromMTP(d.vmax_position()));
// if (d.vunread_count() && d.vunread_muted_count()) {
// feed->setUnreadCounts(
// d.vunread_count()->v,
// d.vunread_muted_count()->v);
// } else {
// session().data().histories().requestDialogEntry(feed);
// }
// }
//} break;
case mtpc_updateDialogUnreadMark: {
const auto &data = update.c_updateDialogUnreadMark();
data.vpeer().match(
@@ -1592,7 +1623,7 @@ void Updates::feedUpdate(const MTPUpdate &update) {
case mtpc_updateDeleteChannelMessages: {
auto &d = update.c_updateDeleteChannelMessages();
auto channel = session().data().channelLoaded(d.vchannel_id().v);
auto channel = session().data().channelLoaded(d.vchannel_id());
if (channel && !_handlingChannelDifference) {
if (channel->ptsRequesting()) { // skip global updates while getting channel difference
@@ -1631,7 +1662,7 @@ void Updates::feedUpdate(const MTPUpdate &update) {
session().data().processWebpage(d.vwebpage());
session().data().sendWebPageGamePollNotifications();
auto channel = session().data().channelLoaded(d.vchannel_id().v);
auto channel = session().data().channelLoaded(d.vchannel_id());
if (channel && !_handlingChannelDifference) {
if (channel->ptsRequesting()) { // skip global updates while getting channel difference
return;
@@ -1652,7 +1683,7 @@ void Updates::feedUpdate(const MTPUpdate &update) {
handleSendActionUpdate(
peerFromUser(d.vuser_id()),
0,
d.vuser_id().v,
peerFromUser(d.vuser_id()),
d.vaction());
} break;
@@ -1661,7 +1692,7 @@ void Updates::feedUpdate(const MTPUpdate &update) {
handleSendActionUpdate(
peerFromChat(d.vchat_id()),
0,
d.vuser_id().v,
peerFromMTP(d.vfrom_id()),
d.vaction());
} break;
@@ -1670,7 +1701,7 @@ void Updates::feedUpdate(const MTPUpdate &update) {
handleSendActionUpdate(
peerFromChannel(d.vchannel_id()),
d.vtop_msg_id().value_or_empty(),
d.vuser_id().v,
peerFromMTP(d.vfrom_id()),
d.vaction());
} break;
@@ -1696,7 +1727,7 @@ void Updates::feedUpdate(const MTPUpdate &update) {
case mtpc_updateUserStatus: {
auto &d = update.c_updateUserStatus();
if (auto user = session().data().userLoaded(d.vuser_id().v)) {
if (auto user = session().data().userLoaded(d.vuser_id())) {
switch (d.vstatus().type()) {
case mtpc_userStatusEmpty: user->onlineTill = 0; break;
case mtpc_userStatusRecently:
@@ -1713,7 +1744,7 @@ void Updates::feedUpdate(const MTPUpdate &update) {
user,
Data::PeerUpdate::Flag::OnlineStatus);
}
if (d.vuser_id().v == session().userId()) {
if (UserId(d.vuser_id()) == session().userId()) {
if (d.vstatus().type() == mtpc_userStatusOffline
|| d.vstatus().type() == mtpc_userStatusEmpty) {
updateOnline(true);
@@ -1730,7 +1761,7 @@ void Updates::feedUpdate(const MTPUpdate &update) {
case mtpc_updateUserName: {
auto &d = update.c_updateUserName();
if (auto user = session().data().userLoaded(d.vuser_id().v)) {
if (auto user = session().data().userLoaded(d.vuser_id())) {
if (!user->isContact()) {
user->setName(
TextUtilities::SingleLine(qs(d.vfirst_name())),
@@ -1749,7 +1780,7 @@ void Updates::feedUpdate(const MTPUpdate &update) {
case mtpc_updateUserPhoto: {
auto &d = update.c_updateUserPhoto();
if (auto user = session().data().userLoaded(d.vuser_id().v)) {
if (auto user = session().data().userLoaded(d.vuser_id())) {
user->setPhoto(d.vphoto());
user->loadUserpic();
// After that update we don't have enough information to
@@ -1760,11 +1791,11 @@ void Updates::feedUpdate(const MTPUpdate &update) {
//
//if (mtpIsTrue(d.vprevious()) || !user->userpicPhotoId()) {
session().storage().remove(Storage::UserPhotosRemoveAfter(
user->bareId(),
peerToUser(user->id),
user->userpicPhotoId()));
//} else {
// session().storage().add(Storage::UserPhotosAddNew(
// user->bareId(),
// peerToUser(user->id),
// user->userpicPhotoId()));
//}
}
@@ -1798,7 +1829,7 @@ void Updates::feedUpdate(const MTPUpdate &update) {
case mtpc_updateUserPhone: {
const auto &d = update.c_updateUserPhone();
if (const auto user = session().data().userLoaded(d.vuser_id().v)) {
if (const auto user = session().data().userLoaded(d.vuser_id())) {
const auto newPhone = qs(d.vphone());
if (newPhone != user->phone()) {
user->setPhone(newPhone);
@@ -1881,8 +1912,8 @@ void Updates::feedUpdate(const MTPUpdate &update) {
auto &d = update.c_updatePrivacy();
const auto allChatsLoaded = [&](const MTPVector<MTPint> &ids) {
for (const auto &chatId : ids.v) {
if (!session().data().chatLoaded(chatId.v)
&& !session().data().channelLoaded(chatId.v)) {
if (!session().data().chatLoaded(chatId)
&& !session().data().channelLoaded(chatId)) {
return false;
}
}
@@ -1966,7 +1997,7 @@ void Updates::feedUpdate(const MTPUpdate &update) {
}
DEBUG_LOG(("API Error: "
"pinned chat not loaded for peer %1, folder: %2"
).arg(id
).arg(id.value
).arg(folderId
));
return false;
@@ -1994,7 +2025,7 @@ void Updates::feedUpdate(const MTPUpdate &update) {
case mtpc_updateChannel: {
auto &d = update.c_updateChannel();
if (const auto channel = session().data().channelLoaded(d.vchannel_id().v)) {
if (const auto channel = session().data().channelLoaded(d.vchannel_id())) {
channel->inviter = UserId(0);
if (channel->amIn()) {
if (channel->isMegagroup()
@@ -2003,17 +2034,10 @@ void Updates::feedUpdate(const MTPUpdate &update) {
channel->updateFullForced();
}
const auto history = channel->owner().history(channel);
//if (const auto feed = channel->feed()) { // #feed
// feed->requestChatListMessage();
// if (!feed->unreadCountKnown()) {
// feed->owner().histories().requestDialogEntry(feed);
// }
//} else {
history->requestChatListMessage();
if (!history->unreadCountKnown()) {
history->owner().histories().requestDialogEntry(history);
}
//}
history->requestChatListMessage();
if (!history->unreadCountKnown()) {
history->owner().histories().requestDialogEntry(history);
}
if (!channel->amCreator()) {
session().api().requestSelfParticipant(channel);
}
@@ -2023,7 +2047,7 @@ void Updates::feedUpdate(const MTPUpdate &update) {
case mtpc_updateChannelTooLong: {
const auto &d = update.c_updateChannelTooLong();
if (const auto channel = session().data().channelLoaded(d.vchannel_id().v)) {
if (const auto channel = session().data().channelLoaded(d.vchannel_id())) {
const auto pts = d.vpts();
if (!pts || channel->pts() < pts->v) {
getChannelDifference(channel);
@@ -2082,7 +2106,7 @@ void Updates::feedUpdate(const MTPUpdate &update) {
case mtpc_updateChannelAvailableMessages: {
auto &d = update.c_updateChannelAvailableMessages();
if (const auto channel = session().data().channelLoaded(d.vchannel_id().v)) {
if (const auto channel = session().data().channelLoaded(d.vchannel_id())) {
channel->setAvailableMinId(d.vavailable_min_id().v);
if (const auto history = session().data().historyLoaded(channel)) {
history->clearUpTill(d.vavailable_min_id().v);

View File

@@ -10,10 +10,13 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "data/data_pts_waiter.h"
#include "base/timer.h"
class RPCError;
class ApiWrap;
class History;
namespace MTP {
class Error;
} // namespace MTP
namespace Main {
class Session;
} // namespace Main
@@ -63,6 +66,12 @@ private:
AfterFail,
};
enum class SkipUpdatePolicy {
SkipNone,
SkipMessageIds,
SkipExceptGroupCallParticipants,
};
struct ActiveChatTracker {
PeerData *peer = nullptr;
rpl::lifetime lifetime;
@@ -89,7 +98,7 @@ private:
not_null<ChannelData*> channel,
ChannelDifferenceRequest from = ChannelDifferenceRequest::Unknown);
void differenceDone(const MTPupdates_Difference &result);
void differenceFail(const RPCError &error);
void differenceFail(const MTP::Error &error);
void feedDifference(
const MTPVector<MTPUser> &users,
const MTPVector<MTPChat> &chats,
@@ -102,7 +111,7 @@ private:
const MTPupdates_ChannelDifference &diff);
void channelDifferenceFail(
not_null<ChannelData*> channel,
const RPCError &error);
const MTP::Error &error);
void failDifferenceStartTimerFor(ChannelData *channel);
void feedChannelDifference(const MTPDupdates_channelDifference &data);
@@ -110,12 +119,14 @@ private:
void mtpNewSessionCreated();
void feedUpdateVector(
const MTPVector<MTPUpdate> &updates,
bool skipMessageIds = false);
SkipUpdatePolicy policy = SkipUpdatePolicy::SkipNone);
// Doesn't call sendHistoryChangeNotifications itself.
void feedMessageIds(const MTPVector<MTPUpdate> &updates);
// Doesn't call sendHistoryChangeNotifications itself.
void feedUpdate(const MTPUpdate &update);
void applyGroupCallParticipantUpdates(const MTPUpdates &updates);
bool whenGetDiffChanged(
ChannelData *channel,
int32 ms,
@@ -125,7 +136,7 @@ private:
void handleSendActionUpdate(
PeerId peerId,
MsgId rootId,
UserId userId,
PeerId fromId,
const MTPSendMessageAction &action);
const not_null<Main::Session*> _session;
@@ -168,7 +179,7 @@ private:
base::flat_map<int, ActiveChatTracker> _activeChats;
base::flat_map<
not_null<PeerData*>,
base::flat_map<UserId, crl::time>> _pendingSpeakingCallMembers;
base::flat_map<PeerId, crl::time>> _pendingSpeakingCallParticipants;
mtpRequestId _onlineRequest = 0;
base::Timer _idleFinishTimer;

File diff suppressed because it is too large Load Diff

View File

@@ -76,6 +76,15 @@ inline QString ToString(uint64 value) {
return QString::number(value);
}
template <uchar Shift>
inline QString ToString(ChatIdType<Shift> value) {
return QString::number(value.bare);
}
inline QString ToString(PeerId value) {
return QString::number(value.value);
}
} // namespace details
template <
@@ -171,7 +180,6 @@ public:
not_null<History*> history,
bool archived,
Fn<void()> callback);
//void ungroupAllFromFeed(not_null<Data::Feed*> feed); // #feed
using RequestMessageDataCallback = Fn<void(ChannelData*, MsgId)>;
void requestMessageData(
@@ -190,15 +198,10 @@ public:
rpl::producer<bool> dialogsLoadMayBlockByDate() const;
rpl::producer<bool> dialogsLoadBlockedByDate() const;
//void applyFeedSources(const MTPDchannels_feedSources &data); // #feed
//void setFeedChannels(
// not_null<Data::Feed*> feed,
// const std::vector<not_null<ChannelData*>> &channels);
void requestWallPaper(
const QString &slug,
Fn<void(const Data::WallPaper &)> done,
Fn<void(const RPCError &)> fail);
Fn<void(const MTP::Error &)> fail);
void requestFullPeer(not_null<PeerData*> peer);
void requestPeer(not_null<PeerData*> peer);
@@ -233,7 +236,7 @@ public:
void checkChatInvite(
const QString &hash,
FnMut<void(const MTPChatInvite &)> done,
FnMut<void(const RPCError &)> fail);
Fn<void(const MTP::Error &)> fail);
void importChatInvite(const QString &hash);
void requestChannelMembersForAdd(
@@ -249,20 +252,22 @@ public:
void migrateChat(
not_null<ChatData*> chat,
FnMut<void(not_null<ChannelData*>)> done,
FnMut<void(const RPCError &)> fail = nullptr);
Fn<void(const MTP::Error &)> fail = nullptr);
void markMediaRead(const base::flat_set<not_null<HistoryItem*>> &items);
void markMediaRead(not_null<HistoryItem*> item);
void requestSelfParticipant(not_null<ChannelData*> channel);
void kickParticipant(not_null<ChatData*> chat, not_null<UserData*> user);
void kickParticipant(
not_null<ChatData*> chat,
not_null<PeerData*> participant);
void kickParticipant(
not_null<ChannelData*> channel,
not_null<UserData*> user,
not_null<PeerData*> participant,
const MTPChatBannedRights &currentRights);
void unblockParticipant(
not_null<ChannelData*> channel,
not_null<UserData*> user);
not_null<PeerData*> participant);
void deleteAllFromUser(
not_null<ChannelData*> channel,
not_null<UserData*> from);
@@ -334,14 +339,6 @@ public:
not_null<UserData*> user,
PhotoId afterId);
//void requestFeedChannels( // #feed
// not_null<Data::Feed*> feed);
//void requestFeedMessages(
// not_null<Data::Feed*> feed,
// Data::MessagePosition messageId,
// SliceType slice);
//void saveDefaultFeedId(FeedId id, bool isDefaultFeedId);
void stickerSetInstalled(uint64 setId) {
_stickerSetInstalled.fire_copy(setId);
}
@@ -384,9 +381,6 @@ public:
const QString &lastName,
const SendAction &action);
void shareContact(not_null<UserData*> user, const SendAction &action);
//void readFeed( // #feed
// not_null<Data::Feed*> feed,
// Data::MessagePosition position);
void applyAffectedMessages(
not_null<PeerData*> peer,
const MTPmessages_AffectedMessages &result);
@@ -411,8 +405,7 @@ public:
Ui::PreparedList &&list,
SendMediaType type,
TextWithTags &&caption,
const SendAction &action,
MsgId msgIdToEdit);
const SendAction &action);
void sendUploadedPhoto(
FullMsgId localId,
@@ -433,7 +426,7 @@ public:
not_null<InlineBots::Result*> data,
const SendAction &action);
void sendMessageFail(
const RPCError &error,
const MTP::Error &error,
not_null<PeerData*> peer,
uint64 randomId = 0,
FullMsgId itemId = FullMsgId());
@@ -470,7 +463,7 @@ public:
const PollData &data,
const SendAction &action,
Fn<void()> done,
Fn<void(const RPCError &error)> fail);
Fn<void(const MTP::Error &error)> fail);
void sendPollVotes(
FullMsgId itemId,
const std::vector<QByteArray> &options);
@@ -565,17 +558,11 @@ private:
const QVector<MTPChannelParticipant> &participants);
void jumpToHistoryDate(not_null<PeerData*> peer, const QDate &date);
//void jumpToFeedDate(not_null<Data::Feed*> feed, const QDate &date); // #feed
template <typename Callback>
void requestMessageAfterDate(
not_null<PeerData*> peer,
const QDate &date,
Callback &&callback);
//template <typename Callback> // #feed
//void requestMessageAfterDate(
// not_null<Data::Feed*> feed,
// const QDate &date,
// Callback &&callback);
void sharedMediaDone(
not_null<PeerData*> peer,
@@ -589,13 +576,6 @@ private:
PhotoId photoId,
const MTPphotos_Photos &result);
//void feedChannelsDone(not_null<Data::Feed*> feed); // #feed
//void feedMessagesDone(
// not_null<Data::Feed*> feed,
// Data::MessagePosition messageId,
// SliceType slice,
// const MTPmessages_FeedMessages &result);
void sendSharedContact(
const QString &phone,
const QString &firstName,
@@ -636,8 +616,6 @@ private:
uint64 randomId);
FileLoadTo fileLoadTaskOptions(const SendAction &action) const;
//void readFeeds(); // #feed
void getTopPromotionDelayed(TimeId now, TimeId next);
void topPromotionDone(const MTPhelp_PromoData &proxy);
@@ -660,7 +638,7 @@ private:
void migrateDone(
not_null<PeerData*> peer,
not_null<ChannelData*> channel);
void migrateFail(not_null<PeerData*> peer, const RPCError &error);
void migrateFail(not_null<PeerData*> peer, const MTP::Error &error);
not_null<Main::Session*> _session;
@@ -690,7 +668,7 @@ private:
using KickRequest = std::pair<
not_null<ChannelData*>,
not_null<UserData*>>;
not_null<PeerData*>>;
base::flat_map<KickRequest, mtpRequestId> _kickRequests;
base::flat_set<not_null<ChannelData*>> _selfParticipantRequests;
@@ -737,20 +715,6 @@ private:
base::flat_map<not_null<UserData*>, mtpRequestId> _userPhotosRequests;
//base::flat_set<not_null<Data::Feed*>> _feedChannelsGetRequests; // #feed
//base::flat_map<
// not_null<Data::Feed*>,
// mtpRequestId> _feedChannelsSetRequests;
//base::flat_set<std::tuple<
// not_null<Data::Feed*>,
// Data::MessagePosition,
// SliceType>> _feedMessagesRequests;
//base::flat_set<std::tuple<
// not_null<Data::Feed*>,
// Data::MessagePosition,
// SliceType>> _feedMessagesRequestsPending;
//mtpRequestId _saveDefaultFeedIdRequest = 0;
std::unique_ptr<DialogsLoadState> _dialogsLoadState;
TimeId _dialogsLoadTill = 0;
rpl::variable<bool> _dialogsLoadMayBlockByDate = false;
@@ -769,11 +733,6 @@ private:
rpl::event_stream<uint64> _stickerSetInstalled;
// #feed
//base::flat_map<not_null<Data::Feed*>, crl::time> _feedReadsDelayed;
//base::flat_map<not_null<Data::Feed*>, mtpRequestId> _feedReadRequests;
//base::Timer _feedReadTimer;
mtpRequestId _topPromotionRequestId = 0;
std::pair<QString, uint32> _topPromotionKey;
TimeId _topPromotionNextRequestTime = TimeId(0);
@@ -793,11 +752,11 @@ private:
mtpRequestId _checkInviteRequestId = 0;
FnMut<void(const MTPChatInvite &result)> _checkInviteDone;
FnMut<void(const RPCError &error)> _checkInviteFail;
Fn<void(const MTP::Error &error)> _checkInviteFail;
struct MigrateCallbacks {
FnMut<void(not_null<ChannelData*>)> done;
FnMut<void(const RPCError&)> fail;
Fn<void(const MTP::Error&)> fail;
};
base::flat_map<
not_null<PeerData*>,
@@ -837,7 +796,7 @@ private:
mtpRequestId _wallPaperRequestId = 0;
QString _wallPaperSlug;
Fn<void(const Data::WallPaper &)> _wallPaperDone;
Fn<void(const RPCError &)> _wallPaperFail;
Fn<void(const MTP::Error &)> _wallPaperFail;
mtpRequestId _contactSignupSilentRequestId = 0;
std::optional<bool> _contactSignupSilent;

View File

@@ -94,7 +94,7 @@ void ChatCreateDone(
}
| [&](auto chats) {
return navigation->session().data().chat(
chats->front().c_chat().vid().v);
chats->front().c_chat().vid());
}
| [&](not_null<ChatData*> chat) {
if (!image.isNull()) {
@@ -268,7 +268,7 @@ AddContactBox::AddContactBox(
this,
st::defaultInputField,
tr::lng_contact_phone(),
ExtractPhonePrefix(session->user()->phone()),
Ui::ExtractPhonePrefix(session->user()->phone()),
phone)
, _invertOrder(langFirstNameGoesSecond()) {
if (!phone.isEmpty()) {
@@ -401,7 +401,7 @@ void AddContactBox::save() {
const auto extractUser = [&](const MTPImportedContact &data) {
return data.match([&](const MTPDimportedContact &data) {
return (data.vclient_id().v == _contactId)
? _session->data().userLoaded(data.vuser_id().v)
? _session->data().userLoaded(data.vuser_id())
: nullptr;
});
};
@@ -586,7 +586,7 @@ void GroupInfoBox::createGroup(
Ui::hideLayer(); // Destroys 'this'.
ChatCreateDone(navigation, std::move(image), result);
}).fail([=](const RPCError &error) {
}).fail([=](const MTP::Error &error) {
_creationRequestId = 0;
if (error.type() == qstr("NO_CHAT_TITLE")) {
auto weak = Ui::MakeWeak(this);
@@ -687,7 +687,7 @@ void GroupInfoBox::createChannel(const QString &title, const QString &descriptio
}
| [&](auto chats) {
return _navigation->session().data().channel(
chats->front().c_channel().vid().v);
chats->front().c_channel().vid());
}
| [&](not_null<ChannelData*> channel) {
auto image = _photo->takeResultImage();
@@ -703,7 +703,7 @@ void GroupInfoBox::createChannel(const QString &title, const QString &descriptio
LOG(("API Error: channel not found in updates (GroupInfoBox::creationDone)"));
closeBox();
}
}).fail([this](const RPCError &error) {
}).fail([this](const MTP::Error &error) {
_creationRequestId = 0;
if (error.type() == "NO_CHAT_TITLE") {
_title->setFocus();
@@ -824,7 +824,7 @@ void SetupChannelBox::prepare() {
_checkRequestId = _api.request(MTPchannels_CheckUsername(
_channel->inputChannel,
MTP_string("preston")
)).fail([=](const RPCError &error) {
)).fail([=](const MTP::Error &error) {
firstCheckFail(error);
}).send();
@@ -983,7 +983,7 @@ void SetupChannelBox::save() {
MTP_string(_sentUsername)
)).done([=](const MTPBool &result) {
updateDone(result);
}).fail([=](const RPCError &error) {
}).fail([=](const MTP::Error &error) {
updateFail(error);
}).send();
};
@@ -1055,7 +1055,7 @@ void SetupChannelBox::check() {
MTP_string(link)
)).done([=](const MTPBool &result) {
checkDone(result);
}).fail([=](const RPCError &error) {
}).fail([=](const MTP::Error &error) {
checkFail(error);
}).send();
}
@@ -1095,7 +1095,7 @@ void SetupChannelBox::updateDone(const MTPBool &result) {
closeBox();
}
void SetupChannelBox::updateFail(const RPCError &error) {
void SetupChannelBox::updateFail(const MTP::Error &error) {
_saveRequestId = 0;
QString err(error.type());
if (err == "USERNAME_NOT_MODIFIED"
@@ -1130,7 +1130,7 @@ void SetupChannelBox::checkDone(const MTPBool &result) {
}
}
void SetupChannelBox::checkFail(const RPCError &error) {
void SetupChannelBox::checkFail(const MTP::Error &error) {
_checkRequestId = 0;
QString err(error.type());
if (err == qstr("CHANNEL_PUBLIC_GROUP_NA")) {
@@ -1171,7 +1171,7 @@ void SetupChannelBox::showRevokePublicLinkBoxForEdit() {
Ui::LayerOption::KeepOther);
}
void SetupChannelBox::firstCheckFail(const RPCError &error) {
void SetupChannelBox::firstCheckFail(const MTP::Error &error) {
_checkRequestId = 0;
const auto &type = error.type();
if (type == qstr("CHANNEL_PUBLIC_GROUP_NA")) {
@@ -1281,7 +1281,7 @@ void EditNameBox::save() {
MTPstring()
)).done([=](const MTPUser &result) {
saveSelfDone(result);
}).fail([=](const RPCError &error) {
}).fail([=](const MTP::Error &error) {
saveSelfFail(error);
}).send();
}
@@ -1291,7 +1291,7 @@ void EditNameBox::saveSelfDone(const MTPUser &user) {
closeBox();
}
void EditNameBox::saveSelfFail(const RPCError &error) {
void EditNameBox::saveSelfFail(const MTP::Error &error) {
auto err = error.type();
auto first = TextUtilities::SingleLine(_first->getLastText().trimmed());
auto last = TextUtilities::SingleLine(_last->getLastText().trimmed());

View File

@@ -179,11 +179,11 @@ private:
void save();
void updateDone(const MTPBool &result);
void updateFail(const RPCError &error);
void updateFail(const MTP::Error &error);
void checkDone(const MTPBool &result);
void checkFail(const RPCError &error);
void firstCheckFail(const RPCError &error);
void checkFail(const MTP::Error &error);
void firstCheckFail(const MTP::Error &error);
void updateMaxHeight();
@@ -229,7 +229,7 @@ private:
void submit();
void save();
void saveSelfDone(const MTPUser &user);
void saveSelfFail(const RPCError &error);
void saveSelfFail(const MTP::Error &error);
const not_null<UserData*> _user;
MTP::Sender _api;

View File

@@ -158,15 +158,15 @@ void AutoDownloadBox::setupContent() {
};
addButton(tr::lng_connection_save(), [=] {
auto &&values = ranges::view::concat(
auto &&values = ranges::views::concat(
*downloadValues,
*autoPlayValues);
auto allowMore = values | ranges::view::filter([&](Pair pair) {
auto allowMore = values | ranges::views::filter([&](Pair pair) {
const auto [type, enabled] = pair;
const auto value = enabled ? limitByType(type) : 0;
const auto old = settings->bytesLimit(_source, type);
return (old < value);
}) | ranges::view::transform([](Pair pair) {
}) | ranges::views::transform([](Pair pair) {
return pair.first;
});
const auto less = ranges::any_of(*autoPlayValues, [&](Pair pair) {
@@ -191,7 +191,7 @@ void AutoDownloadBox::setupContent() {
});
if (changed) {
for (const auto [type, enabled] : values) {
for (const auto &[type, enabled] : values) {
const auto value = enabled ? limitByType(type) : 0;
settings->setBytesLimit(_source, type, value);
}

View File

@@ -248,9 +248,9 @@ void BackgroundBox::Inner::updatePapers() {
_over = _overDown = Selection();
_papers = _session->data().wallpapers(
) | ranges::view::filter([](const Data::WallPaper &paper) {
) | ranges::views::filter([](const Data::WallPaper &paper) {
return !paper.isPattern() || paper.backgroundColor().has_value();
}) | ranges::view::transform([](const Data::WallPaper &paper) {
}) | ranges::views::transform([](const Data::WallPaper &paper) {
return Paper{ paper };
}) | ranges::to_vector;
sortPapers();
@@ -268,7 +268,7 @@ void BackgroundBox::Inner::resizeToContentAndPreload() {
+ st::backgroundPadding));
const auto preload = kBackgroundsInRow * 3;
for (const auto &paper : _papers | ranges::view::take(preload)) {
for (const auto &paper : _papers | ranges::views::take(preload)) {
if (!paper.data.localThumbnail() && !paper.dataMedia) {
if (const auto document = paper.data.document()) {
paper.dataMedia = document->createMediaView();

View File

@@ -295,7 +295,7 @@ AdminLog::OwnedItem GenerateTextItem(
| (out ? Flag::f_out : Flag(0));
const auto clientFlags = MTPDmessage_ClientFlag::f_fake_history_item;
const auto replyTo = 0;
const auto viaBotId = 0;
const auto viaBotId = UserId(0);
const auto item = history->makeMessage(
++id,
flags,
@@ -402,14 +402,12 @@ BackgroundPreviewBox::BackgroundPreviewBox(
, _controller(controller)
, _text1(GenerateTextItem(
delegate(),
_controller->session().data().history(
peerFromUser(PeerData::kServiceNotificationsId)),
_controller->session().data().history(PeerData::kServiceNotificationsId),
tr::lng_background_text1(tr::now),
false))
, _text2(GenerateTextItem(
delegate(),
_controller->session().data().history(
peerFromUser(PeerData::kServiceNotificationsId)),
_controller->session().data().history(PeerData::kServiceNotificationsId),
tr::lng_background_text2(tr::now),
true))
, _paper(paper)
@@ -785,7 +783,7 @@ bool BackgroundPreviewBox::Start(
Ui::show(Box<BackgroundPreviewBox>(
controller,
result.withUrlParams(params)));
}), [](const RPCError &error) {
}), [](const MTP::Error &error) {
Ui::show(Box<InformBox>(tr::lng_background_bad_link(tr::now)));
});
return true;

View File

@@ -111,7 +111,7 @@ confirmInviteUserName: FlatLabel(defaultFlatLabel) {
confirmInviteUserNameTop: 227px;
confirmPhoneAboutLabel: FlatLabel(defaultFlatLabel) {
minWidth: 282px;
minWidth: 272px;
}
confirmPhoneCodeField: InputField(defaultInputField) {
}
@@ -158,27 +158,28 @@ contactsMarginBottom: 4px;
membersMarginTop: 10px;
membersMarginBottom: 10px;
peerListBoxItem: PeerListItem(defaultPeerListItem) {
height: 56px;
photoSize: contactsPhotoSize;
photoPosition: point(16px, 7px);
namePosition: point(74px, 9px);
statusPosition: point(74px, 30px);
button: OutlineButton(defaultPeerListButton) {
textBg: contactsBg;
textBgOver: contactsBgOver;
ripple: defaultRippleAnimation;
}
statusFg: contactsStatusFg;
statusFgOver: contactsStatusFgOver;
statusFgActive: contactsStatusFgOnline;
}
peerListBox: PeerList(defaultPeerList) {
padding: margins(
0px,
membersMarginTop,
0px,
membersMarginBottom);
item: PeerListItem(defaultPeerListItem) {
height: 56px;
photoSize: contactsPhotoSize;
photoPosition: point(16px, 7px);
namePosition: point(74px, 9px);
statusPosition: point(74px, 30px);
button: OutlineButton(defaultPeerListButton) {
textBg: contactsBg;
textBgOver: contactsBgOver;
ripple: defaultRippleAnimation;
}
statusFg: contactsStatusFg;
statusFgOver: contactsStatusFgOver;
statusFgActive: contactsStatusFgOnline;
}
item: peerListBoxItem;
}
localStorageRowHeight: 50px;
@@ -214,17 +215,23 @@ localStorageLimitMargin: margins(22px, 5px, 20px, 10px);
shareRowsTop: 12px;
shareRowHeight: 108px;
sharePhotoTop: 6px;
sharePhotoCheckbox: RoundImageCheckbox(defaultPeerListCheckbox) {
imageRadius: 28px;
imageSmallRadius: 24px;
shareBoxListItem: PeerListItem(defaultPeerListItem) {
nameStyle: TextStyle(defaultTextStyle) {
font: font(11px);
linkFont: font(11px);
linkFontOver: font(11px);
}
nameFg: windowFg;
nameFgChecked: windowActiveTextFg;
checkbox: RoundImageCheckbox(defaultPeerListCheckbox) {
imageRadius: 28px;
imageSmallRadius: 24px;
}
}
shareNameStyle: TextStyle(defaultTextStyle) {
font: font(11px);
linkFont: font(11px);
linkFontOver: font(11px);
shareBoxList: PeerList(defaultPeerList) {
bg: boxBg;
item: shareBoxListItem;
}
shareNameFg: windowFg;
shareNameActiveFg: windowActiveTextFg;
shareNameTop: 6px;
shareColumnSkip: 6px;
shareActivateDuration: 150;

View File

@@ -78,7 +78,7 @@ protected:
private:
void submit();
void sendPhoneDone(const MTPauth_SentCode &result, const QString &phoneNumber);
void sendPhoneFail(const RPCError &error, const QString &phoneNumber);
void sendPhoneFail(const MTP::Error &error, const QString &phoneNumber);
void showError(const QString &text);
void hideError() {
showError(QString());
@@ -114,7 +114,7 @@ private:
void submit();
void sendCall();
void updateCall();
void sendCodeFail(const RPCError &error);
void sendCodeFail(const MTP::Error &error);
void showError(const QString &text);
void hideError() {
showError(QString());
@@ -151,7 +151,7 @@ void ChangePhoneBox::EnterPhone::prepare() {
this,
st::defaultInputField,
tr::lng_change_phone_new_title(),
ExtractPhonePrefix(_session->user()->phone()),
Ui::ExtractPhonePrefix(_session->user()->phone()),
phoneValue);
_phone->resize(st::boxWidth - 2 * st::boxPadding.left(), _phone->height());
@@ -180,7 +180,7 @@ void ChangePhoneBox::EnterPhone::submit() {
MTP_codeSettings(MTP_flags(0))
)).done([=](const MTPauth_SentCode &result) {
sendPhoneDone(result, phoneNumber);
}).fail([=](const RPCError &error) {
}).fail([=](const MTP::Error &error) {
sendPhoneFail(error, phoneNumber);
}).handleFloodErrors().send();
}
@@ -222,9 +222,9 @@ void ChangePhoneBox::EnterPhone::sendPhoneDone(
Ui::LayerOption::KeepOther);
}
void ChangePhoneBox::EnterPhone::sendPhoneFail(const RPCError &error, const QString &phoneNumber) {
void ChangePhoneBox::EnterPhone::sendPhoneFail(const MTP::Error &error, const QString &phoneNumber) {
_requestId = 0;
if (MTP::isFloodError(error)) {
if (MTP::IsFloodError(error)) {
showError(tr::lng_flood_error(tr::now));
} else if (error.type() == qstr("PHONE_NUMBER_INVALID")) {
showError(tr::lng_bad_phone(tr::now));
@@ -320,7 +320,7 @@ void ChangePhoneBox::EnterCode::submit() {
Ui::hideLayer();
}
Ui::Toast::Show(tr::lng_change_phone_success(tr::now));
}).fail(crl::guard(this, [=](const RPCError &error) {
}).fail(crl::guard(this, [=](const MTP::Error &error) {
sendCodeFail(error);
})).handleFloodErrors().send();
}
@@ -354,9 +354,9 @@ void ChangePhoneBox::EnterCode::showError(const QString &text) {
}
}
void ChangePhoneBox::EnterCode::sendCodeFail(const RPCError &error) {
void ChangePhoneBox::EnterCode::sendCodeFail(const MTP::Error &error) {
_requestId = 0;
if (MTP::isFloodError(error)) {
if (MTP::IsFloodError(error)) {
showError(tr::lng_flood_error(tr::now));
} else if (error.type() == qstr("PHONE_CODE_EMPTY") || error.type() == qstr("PHONE_CODE_INVALID")) {
showError(tr::lng_bad_code(tr::now));

View File

@@ -304,9 +304,10 @@ void ConfirmBox::mouseReleaseEvent(QMouseEvent *e) {
_lastMousePos = e->globalPos();
updateHover();
if (const auto activated = ClickHandler::unpressed()) {
const auto guard = window();
Ui::hideLayer();
ActivateClickHandler(guard, activated, e->button());
ActivateClickHandler(window(), activated, e->button());
crl::on_main(this, [=] {
closeBox();
});
return;
}
BoxContent::mouseReleaseEvent(e);
@@ -536,7 +537,7 @@ void PinMessageBox::pinMessage() {
)).done([=](const MTPUpdates &result) {
_peer->session().api().applyUpdates(result);
Ui::hideLayer();
}).fail([=](const RPCError &error) {
}).fail([=](const MTP::Error &error) {
Ui::hideLayer();
}).send();
}
@@ -762,11 +763,11 @@ auto DeleteMessagesBox::revokeText(not_null<PeerData*> peer) const
return result;
}
const auto items = ranges::view::all(
const auto items = ranges::views::all(
_ids
) | ranges::view::transform([&](FullMsgId id) {
) | ranges::views::transform([&](FullMsgId id) {
return peer->owner().message(id);
}) | ranges::view::filter([](HistoryItem *item) {
}) | ranges::views::filter([](HistoryItem *item) {
return (item != nullptr);
}) | ranges::to_vector;
@@ -783,7 +784,7 @@ auto DeleteMessagesBox::revokeText(not_null<PeerData*> peer) const
return !item->canDeleteForEveryone(now);
};
const auto canRevokeAll = ranges::none_of(items, cannotRevoke);
auto outgoing = items | ranges::view::filter(&HistoryItem::out);
auto outgoing = items | ranges::views::filter(&HistoryItem::out);
const auto canRevokeOutgoingCount = canRevokeAll
? -1
: ranges::count_if(outgoing, canRevoke);
@@ -900,7 +901,7 @@ void DeleteMessagesBox::deleteAndClear() {
_moderateInChannel->session().api().kickParticipant(
_moderateInChannel,
_moderateFrom,
MTP_chatBannedRights(MTP_flags(0), MTP_int(0)));
ChannelData::EmptyRestrictedRights(_moderateFrom));
}
if (_reportSpam->checked()) {
_moderateInChannel->session().api().request(

View File

@@ -71,14 +71,6 @@ void ShowPhoneBannedError(const QString &phone) {
[=] { SendToBannedHelp(phone); close(); }));
}
QString ExtractPhonePrefix(const QString &phone) {
const auto pattern = phoneNumberParse(phone);
if (!pattern.isEmpty()) {
return phone.mid(0, pattern[0]);
}
return QString();
}
SentCodeField::SentCodeField(
QWidget *parent,
const style::InputField &st,
@@ -249,7 +241,7 @@ void ConfirmPhoneBox::checkPhoneAndHash() {
MTP_codeSettings(MTP_flags(0))
)).done([=](const MTPauth_SentCode &result) {
sendCodeDone(result);
}).fail([=](const RPCError &error) {
}).fail([=](const MTP::Error &error) {
sendCodeFail(error);
}).handleFloodErrors().send();
}
@@ -278,9 +270,9 @@ void ConfirmPhoneBox::sendCodeDone(const MTPauth_SentCode &result) {
});
}
void ConfirmPhoneBox::sendCodeFail(const RPCError &error) {
void ConfirmPhoneBox::sendCodeFail(const MTP::Error &error) {
auto errorText = Lang::Hard::ServerError();
if (MTP::isFloodError(error)) {
if (MTP::IsFloodError(error)) {
errorText = tr::lng_flood_error(tr::now);
} else if (error.code() == 400) {
errorText = tr::lng_confirm_phone_link_invalid(tr::now);
@@ -348,7 +340,7 @@ void ConfirmPhoneBox::sendCode() {
MTP_string(code)
)).done([=](const MTPBool &result) {
confirmDone(result);
}).fail([=](const RPCError &error) {
}).fail([=](const MTP::Error &error) {
confirmFail(error);
}).handleFloodErrors().send();
}
@@ -358,9 +350,9 @@ void ConfirmPhoneBox::confirmDone(const MTPBool &result) {
Ui::show(Box<InformBox>(tr::lng_confirm_phone_success(tr::now, lt_phone, App::formatPhone(_phone))));
}
void ConfirmPhoneBox::confirmFail(const RPCError &error) {
void ConfirmPhoneBox::confirmFail(const MTP::Error &error) {
auto errorText = Lang::Hard::ServerError();
if (MTP::isFloodError(error)) {
if (MTP::IsFloodError(error)) {
errorText = tr::lng_flood_error(tr::now);
} else {
auto &errorType = error.type();

View File

@@ -22,7 +22,6 @@ class Session;
} // namespace Main
void ShowPhoneBannedError(const QString &phone);
[[nodiscard]] QString ExtractPhonePrefix(const QString &phone);
class SentCodeField : public Ui::InputField {
public:
@@ -121,12 +120,12 @@ private:
void checkPhoneAndHash();
void sendCodeDone(const MTPauth_SentCode &result);
void sendCodeFail(const RPCError &error);
void sendCodeFail(const MTP::Error &error);
void callDone(const MTPauth_SentCode &result);
void confirmDone(const MTPBool &result);
void confirmFail(const RPCError &error);
void confirmFail(const MTP::Error &error);
QString getPhone() const {
return _phone;

View File

@@ -896,7 +896,7 @@ void ProxyBox::setupTypes() {
{ Type::Socks5, "SOCKS5" },
{ Type::Mtproto, "MTPROTO" },
};
for (const auto [type, label] : types) {
for (const auto &[type, label] : types) {
_content->add(
object_ptr<Ui::Radioenum<Type>>(
_content,
@@ -1051,9 +1051,9 @@ void ProxyBox::addLabel(
ProxiesBoxController::ProxiesBoxController(not_null<Main::Account*> account)
: _account(account)
, _saveTimer([] { Local::writeSettings(); }) {
_list = ranges::view::all(
_list = ranges::views::all(
Global::ProxiesList()
) | ranges::view::transform([&](const ProxyData &proxy) {
) | ranges::views::transform([&](const ProxyData &proxy) {
return Item{ ++_idCounter, proxy };
}) | ranges::to_vector;

View File

@@ -536,8 +536,8 @@ std::vector<PollAnswer> Options::toPollAnswers() const {
};
ranges::copy(
_list
| ranges::view::filter(&Option::isGood)
| ranges::view::transform(makeAnswer),
| ranges::views::filter(&Option::isGood)
| ranges::views::transform(makeAnswer),
ranges::back_inserter(result));
return result;
}
@@ -593,7 +593,7 @@ void Options::removeEmptyTail() {
_list,
&Option::hasFocus);
const auto end = _list.end();
const auto reversed = ranges::view::reverse(_list);
const auto reversed = ranges::views::reverse(_list);
const auto emptyItem = ranges::find_if(
reversed,
ranges::not_fn(&Option::isEmpty)).base();

View File

@@ -1045,13 +1045,13 @@ void EditCaptionBox::save() {
if (!_preparedList.files.empty()) {
auto action = Api::SendAction(item->history());
action.options = options;
action.replaceMediaOf = item->fullId().msg;
_controller->session().api().editMedia(
std::move(_preparedList),
(!_asFile && _photo) ? SendMediaType::Photo : SendMediaType::File,
_field->getTextWithAppliedMarkdown(),
action,
item->fullId().msg);
action);
closeBox();
return;
}
@@ -1061,7 +1061,7 @@ void EditCaptionBox::save() {
closeBox();
});
const auto fail = crl::guard(this, [=](const RPCError &error) {
const auto fail = crl::guard(this, [=](const MTP::Error &error) {
_saveRequestId = 0;
const auto &type = error.type();
if (ranges::contains(Api::kDefaultEditMessagesErrors, type)) {

View File

@@ -668,7 +668,7 @@ void EditColorBox::Field::changeValue(int delta) {
setText(QString::number(newValue));
setFocus();
selectAll();
emit changed();
changed();
}
}

View File

@@ -182,11 +182,11 @@ QVector<MTPInputPrivacyRule> EditPrivacyBox::collectResult() {
return result;
};
const auto collectInputChats = [](const auto &peers) {
auto result = QVector<MTPint>();
auto result = QVector<MTPint>(); // #TODO ids
result.reserve(peers.size());
for (const auto peer : peers) {
if (!peer->isUser()) {
result.push_back(MTP_int(peer->bareId()));
result.push_back(peerToBareMTPInt(peer->id));
}
}
return result;

View File

@@ -333,9 +333,9 @@ void EditExceptions(
box->addButton(tr::lng_settings_save(), crl::guard(context, [=] {
const auto peers = box->collectSelectedRows();
const auto rules = data->current();
auto &&histories = ranges::view::all(
auto &&histories = ranges::views::all(
peers
) | ranges::view::transform([=](not_null<PeerData*> peer) {
) | ranges::views::transform([=](not_null<PeerData*> peer) {
return window->session().data().history(peer);
});
auto changed = base::flat_set<not_null<History*>>{

View File

@@ -119,7 +119,7 @@ private:
}
[[nodiscard]] uint64 TypeId(Flag flag) {
return PeerIdFakeShift | static_cast<uint64>(flag);
return PeerId(FakeChatId(static_cast<BareId>(flag))).value;
}
TypeRow::TypeRow(Flag flag) : PeerListRow(TypeId(flag)) {

Some files were not shown because too many files have changed in this diff Show More