Compare commits
340 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ffdcda5a90 | ||
|
|
06292e7442 | ||
|
|
5bb73d8d3d | ||
|
|
68e35b232d | ||
|
|
2843500ce3 | ||
|
|
2730ab1596 | ||
|
|
3a28be1e16 | ||
|
|
03214ab522 | ||
|
|
6b1bc1e845 | ||
|
|
1d64b53cd0 | ||
|
|
c360bb9da4 | ||
|
|
08e170a068 | ||
|
|
42d40a6f8f | ||
|
|
d93d47f2cf | ||
|
|
25470cde3c | ||
|
|
c242a61e8c | ||
|
|
286cb74620 | ||
|
|
336405b3c7 | ||
|
|
2eda5bb2d8 | ||
|
|
06618a5253 | ||
|
|
de70df0b6b | ||
|
|
cf6dbfaf55 | ||
|
|
6cbee72b8a | ||
|
|
0a0803de6f | ||
|
|
bee6a1dc06 | ||
|
|
155fcb6dde | ||
|
|
3e5e0cb9df | ||
|
|
be74a391ba | ||
|
|
d71b6effd6 | ||
|
|
5ff70315cb | ||
|
|
04c0d79ccc | ||
|
|
34c5ce16d0 | ||
|
|
e52f947f98 | ||
|
|
40e46e8480 | ||
|
|
c87802ce65 | ||
|
|
73c63cb2c7 | ||
|
|
0ead0879d7 | ||
|
|
52b5c4cbe0 | ||
|
|
a9422111a2 | ||
|
|
e5ac7a1416 | ||
|
|
99501d844d | ||
|
|
46ee5598f5 | ||
|
|
aa843ee978 | ||
|
|
ad0c93cbb1 | ||
|
|
35ff621b5b | ||
|
|
a2d2c8a208 | ||
|
|
0e1a445614 | ||
|
|
13d0d15a50 | ||
|
|
16f1875fdc | ||
|
|
4625e7613b | ||
|
|
a100048cce | ||
|
|
188070d03f | ||
|
|
23996d14d3 | ||
|
|
07c65dfd74 | ||
|
|
61741b53c3 | ||
|
|
ae74c8a6b8 | ||
|
|
4ecd1049b2 | ||
|
|
71c4cc9623 | ||
|
|
d41bd1483e | ||
|
|
0e47c6b415 | ||
|
|
4d91ab7079 | ||
|
|
dc2192d5ca | ||
|
|
1342077dcb | ||
|
|
61d0cc38b0 | ||
|
|
79f7aa703a | ||
|
|
65dd9b82c0 | ||
|
|
96bc4858c1 | ||
|
|
27fc61c676 | ||
|
|
8c7217ad56 | ||
|
|
bd42c68978 | ||
|
|
c2900db061 | ||
|
|
d7e90fec1a | ||
|
|
66e7f05df1 | ||
|
|
088fda4ed8 | ||
|
|
15d17c8b0e | ||
|
|
e6587f2556 | ||
|
|
d40687adb8 | ||
|
|
ee098d00ad | ||
|
|
e106bd143e | ||
|
|
62684ab9bb | ||
|
|
69b70cda54 | ||
|
|
b6c86fd298 | ||
|
|
d55d7f37d7 | ||
|
|
b1c122a260 | ||
|
|
bdffdea358 | ||
|
|
491ec2db7f | ||
|
|
cd4a9d7c16 | ||
|
|
7cbe158d00 | ||
|
|
1cc1f380d0 | ||
|
|
0188719d04 | ||
|
|
e6ba6050e7 | ||
|
|
889e0dc035 | ||
|
|
663db64688 | ||
|
|
2e58993181 | ||
|
|
f09a468a7c | ||
|
|
b08d9fe0b8 | ||
|
|
619f70ab22 | ||
|
|
21b502c754 | ||
|
|
8cac76931e | ||
|
|
00c915e58d | ||
|
|
8889329415 | ||
|
|
3ec3f6484f | ||
|
|
c7a1771dec | ||
|
|
320adcd389 | ||
|
|
1050447eed | ||
|
|
0af6c4b0b6 | ||
|
|
e077163322 | ||
|
|
47fdef1e38 | ||
|
|
fafea73ea7 | ||
|
|
56031a6402 | ||
|
|
5e4bc200c2 | ||
|
|
5bc6e6533f | ||
|
|
76b4e18518 | ||
|
|
994dbf9eb5 | ||
|
|
212497413c | ||
|
|
0d44736575 | ||
|
|
4c707bff29 | ||
|
|
25bbde2739 | ||
|
|
c74e240d30 | ||
|
|
7b277aa770 | ||
|
|
f93527442d | ||
|
|
35610da750 | ||
|
|
21228783da | ||
|
|
b323e5ffcf | ||
|
|
7c979144fc | ||
|
|
fd85efa9ba | ||
|
|
22da48d231 | ||
|
|
3343880ed0 | ||
|
|
df73bda1ff | ||
|
|
75a782cced | ||
|
|
0e126e2550 | ||
|
|
cffb615a4d | ||
|
|
7ab3be3631 | ||
|
|
591488c497 | ||
|
|
ae54c8af6a | ||
|
|
30c86523ff | ||
|
|
9a6e571154 | ||
|
|
13a497cf5d | ||
|
|
6463890b11 | ||
|
|
073b5b106c | ||
|
|
0cd8cc67c5 | ||
|
|
f528a240d9 | ||
|
|
a814c3f428 | ||
|
|
81d052adfc | ||
|
|
822c1cafd2 | ||
|
|
c08a148baf | ||
|
|
a38a94ed9c | ||
|
|
4d579f873c | ||
|
|
56c8327746 | ||
|
|
0e6d4291a2 | ||
|
|
8ca622d077 | ||
|
|
4d24f28fd0 | ||
|
|
2b3469ef22 | ||
|
|
03a868a6e3 | ||
|
|
12db51fe75 | ||
|
|
ce5579e8f9 | ||
|
|
a16b7fbb83 | ||
|
|
9f6f7f7c9b | ||
|
|
a82d1e863e | ||
|
|
26d97a3636 | ||
|
|
7b8e421996 | ||
|
|
2bc2a0e459 | ||
|
|
7cb4b4f8ab | ||
|
|
b439ecce16 | ||
|
|
a33a4c0589 | ||
|
|
5278e2201f | ||
|
|
3bd6b2268f | ||
|
|
a0a13c3b86 | ||
|
|
0052c7938f | ||
|
|
a14db3e492 | ||
|
|
7979b3b6c8 | ||
|
|
3f25e92afd | ||
|
|
3d1cddaca5 | ||
|
|
eeecc42c25 | ||
|
|
e22ecafc1d | ||
|
|
ba41da7b28 | ||
|
|
9cfbccf9e7 | ||
|
|
2b6f50e114 | ||
|
|
d2f57b72c3 | ||
|
|
85ac983a27 | ||
|
|
ac397e6e19 | ||
|
|
38e15c9bdb | ||
|
|
00d65fa978 | ||
|
|
3fea9cca08 | ||
|
|
b390e0766b | ||
|
|
2f75e6bbe2 | ||
|
|
decbbb9a73 | ||
|
|
b4b80822c8 | ||
|
|
bc82cdc3b3 | ||
|
|
ebc67d25f0 | ||
|
|
348b4d54ba | ||
|
|
6f86ce595b | ||
|
|
8c53a3c19e | ||
|
|
67623072d6 | ||
|
|
1291f1c80d | ||
|
|
0684db9bd8 | ||
|
|
db7b61a77b | ||
|
|
d392633b90 | ||
|
|
76e08af26a | ||
|
|
b23f16e6e4 | ||
|
|
23156d523c | ||
|
|
04b0e2e9e6 | ||
|
|
ace5740125 | ||
|
|
bc67b79023 | ||
|
|
528c98af67 | ||
|
|
311a2f2753 | ||
|
|
3defb06783 | ||
|
|
5708b5e849 | ||
|
|
1db1328a91 | ||
|
|
2e9d6d73c3 | ||
|
|
38dd5ab837 | ||
|
|
83ab670c50 | ||
|
|
5621e41529 | ||
|
|
056cab6268 | ||
|
|
61d0d240aa | ||
|
|
33ae4c2802 | ||
|
|
2c806b11d7 | ||
|
|
199434c7a2 | ||
|
|
c65c554d88 | ||
|
|
5d16359a5a | ||
|
|
fd9ad04d15 | ||
|
|
0c8febce9c | ||
|
|
4659cc50f2 | ||
|
|
2fddeb478b | ||
|
|
4ffe1d3acc | ||
|
|
cdf0512515 | ||
|
|
971e188063 | ||
|
|
a909c1a813 | ||
|
|
4fc2b1f1a3 | ||
|
|
fb04f33ae8 | ||
|
|
b2c87e7a73 | ||
|
|
86a33ceea1 | ||
|
|
a5d8d7a550 | ||
|
|
11723aedff | ||
|
|
fe5de8f009 | ||
|
|
6b68d001ae | ||
|
|
ae0b9141dd | ||
|
|
12e306dd7b | ||
|
|
508762cd2c | ||
|
|
9a73c99935 | ||
|
|
ab2c99acf3 | ||
|
|
a506e9b9eb | ||
|
|
c0c10689a1 | ||
|
|
c4dcf064d5 | ||
|
|
d9771d0f88 | ||
|
|
f25b2a2094 | ||
|
|
c9934c142d | ||
|
|
fb7a8cae33 | ||
|
|
ae5c7b19f6 | ||
|
|
a5abe3d813 | ||
|
|
b373a9ed22 | ||
|
|
09966fb291 | ||
|
|
d4bb62d055 | ||
|
|
bbeb9d3950 | ||
|
|
ce84d9c84d | ||
|
|
ed4dea2b0e | ||
|
|
4d4a349f09 | ||
|
|
7430fbacfd | ||
|
|
d624e2ef65 | ||
|
|
0e72dc3974 | ||
|
|
68b0a85369 | ||
|
|
5794679277 | ||
|
|
74c21039b3 | ||
|
|
267e5fd9e0 | ||
|
|
e681b0d95a | ||
|
|
a2695ea0d7 | ||
|
|
c0df6f7bca | ||
|
|
c587335ae1 | ||
|
|
16e1c740ce | ||
|
|
6786d44b69 | ||
|
|
cd8c9a58df | ||
|
|
ecbbdd5e74 | ||
|
|
a8a85b2acf | ||
|
|
8ba77defeb | ||
|
|
84e8053cd0 | ||
|
|
506cd8c7ad | ||
|
|
f8783c3bfc | ||
|
|
b24e5ce809 | ||
|
|
18901a4dc7 | ||
|
|
81e08599dc | ||
|
|
7edc91e29e | ||
|
|
50265afe93 | ||
|
|
4d8ac05d28 | ||
|
|
22aa57ad6f | ||
|
|
5bea88fd66 | ||
|
|
361e3565d4 | ||
|
|
fb579f1c10 | ||
|
|
f66d7088ef | ||
|
|
ccd440ea0b | ||
|
|
f41abe0a28 | ||
|
|
cfd16c6f67 | ||
|
|
ef1d98f3cf | ||
|
|
bc43168ca7 | ||
|
|
b670ca2a51 | ||
|
|
4d093f78e2 | ||
|
|
02e9b8fd18 | ||
|
|
02517f7221 | ||
|
|
2734cab3f2 | ||
|
|
2509f05e28 | ||
|
|
8fee156d21 | ||
|
|
e493ab12dc | ||
|
|
4d9c9bbd6f | ||
|
|
c7c145b226 | ||
|
|
504f5ee5d7 | ||
|
|
3d54192681 | ||
|
|
db0da70de6 | ||
|
|
59e6fd9989 | ||
|
|
b24cba99e2 | ||
|
|
d6848c49e8 | ||
|
|
5d1601d9c9 | ||
|
|
2c6a9614b2 | ||
|
|
cc736158a6 | ||
|
|
817610ddd7 | ||
|
|
77c8ca76b7 | ||
|
|
67cbe61879 | ||
|
|
67eba93e29 | ||
|
|
b918170464 | ||
|
|
a27a54798c | ||
|
|
5f1d56fbc2 | ||
|
|
1fc24398a0 | ||
|
|
99b7f051c7 | ||
|
|
658671089e | ||
|
|
092b6e7c18 | ||
|
|
23272430b4 | ||
|
|
a29ff093f6 | ||
|
|
37a8afaddf | ||
|
|
b08c33cf8a | ||
|
|
a2f8546033 | ||
|
|
580a12ad7f | ||
|
|
d77df9905f | ||
|
|
82f92cffd3 | ||
|
|
8042a83fd2 | ||
|
|
b38d6667c4 | ||
|
|
72704b2426 | ||
|
|
3e379f3171 | ||
|
|
54685155b0 | ||
|
|
54f06740d5 | ||
|
|
204dd0a869 | ||
|
|
8142acc709 | ||
|
|
df70fd3081 |
3
.gitattributes
vendored
@@ -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
@@ -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
|
||||
4
.github/workflows/linux.yml
vendored
@@ -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
@@ -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.
|
||||
30
.github/workflows/mac.yml
vendored
@@ -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
|
||||
|
||||
|
||||
3
.github/workflows/win.yml
vendored
@@ -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
@@ -48,3 +48,5 @@ stage
|
||||
/Linux/
|
||||
/Telegram/Makefile
|
||||
*.*~
|
||||
.idea/
|
||||
cmake-build-debug/
|
||||
|
||||
3
.gitmodules
vendored
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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}
|
||||
|
||||
|
Before Width: | Height: | Size: 718 B |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
BIN
Telegram/Resources/icons/calls/group_calls_raised_hand.png
Normal file
|
After Width: | Height: | Size: 1008 B |
BIN
Telegram/Resources/icons/calls/group_calls_raised_hand@2x.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
Telegram/Resources/icons/calls/group_calls_raised_hand@3x.png
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
Telegram/Resources/icons/calls/group_calls_share.png
Normal file
|
After Width: | Height: | Size: 566 B |
BIN
Telegram/Resources/icons/calls/group_calls_share@2x.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
Telegram/Resources/icons/calls/group_calls_share@3x.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
1
Telegram/Resources/icons/calls/hands.lottie
Normal file
1
Telegram/Resources/icons/calls/voice.lottie
Normal file
|
Before Width: | Height: | Size: 328 B |
|
Before Width: | Height: | Size: 626 B |
|
Before Width: | Height: | Size: 841 B |
|
Before Width: | Height: | Size: 748 B |
|
Before Width: | Height: | Size: 1.6 KiB |
BIN
Telegram/Resources/icons/inline_button_card.png
Normal file
|
After Width: | Height: | Size: 213 B |
BIN
Telegram/Resources/icons/inline_button_card@2x.png
Normal file
|
After Width: | Height: | Size: 249 B |
BIN
Telegram/Resources/icons/inline_button_card@3x.png
Normal file
|
After Width: | Height: | Size: 300 B |
|
Before Width: | Height: | Size: 228 B After Width: | Height: | Size: 338 B |
|
Before Width: | Height: | Size: 341 B After Width: | Height: | Size: 569 B |
|
Before Width: | Height: | Size: 427 B After Width: | Height: | Size: 768 B |
|
Before Width: | Height: | Size: 146 B After Width: | Height: | Size: 305 B |
|
Before Width: | Height: | Size: 234 B After Width: | Height: | Size: 428 B |
|
Before Width: | Height: | Size: 273 B After Width: | Height: | Size: 550 B |
BIN
Telegram/Resources/icons/payments/payment_address.png
Normal file
|
After Width: | Height: | Size: 802 B |
BIN
Telegram/Resources/icons/payments/payment_address@2x.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
Telegram/Resources/icons/payments/payment_address@3x.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
Telegram/Resources/icons/payments/payment_card.png
Normal file
|
After Width: | Height: | Size: 357 B |
BIN
Telegram/Resources/icons/payments/payment_card@2x.png
Normal file
|
After Width: | Height: | Size: 560 B |
BIN
Telegram/Resources/icons/payments/payment_card@3x.png
Normal file
|
After Width: | Height: | Size: 985 B |
BIN
Telegram/Resources/icons/payments/payment_email.png
Normal file
|
After Width: | Height: | Size: 949 B |
BIN
Telegram/Resources/icons/payments/payment_email@2x.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
Telegram/Resources/icons/payments/payment_email@3x.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
Telegram/Resources/icons/payments/payment_name.png
Normal file
|
After Width: | Height: | Size: 473 B |
BIN
Telegram/Resources/icons/payments/payment_name@2x.png
Normal file
|
After Width: | Height: | Size: 884 B |
BIN
Telegram/Resources/icons/payments/payment_name@3x.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
Telegram/Resources/icons/payments/payment_phone.png
Normal file
|
After Width: | Height: | Size: 711 B |
BIN
Telegram/Resources/icons/payments/payment_phone@2x.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
Telegram/Resources/icons/payments/payment_phone@3x.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
Telegram/Resources/icons/payments/payment_shipping.png
Normal file
|
After Width: | Height: | Size: 526 B |
BIN
Telegram/Resources/icons/payments/payment_shipping@2x.png
Normal file
|
After Width: | Height: | Size: 1022 B |
BIN
Telegram/Resources/icons/payments/payment_shipping@3x.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
@@ -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 haven’t 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.";
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
BIN
Telegram/Resources/sounds/group_call_allowed.mp3
Normal 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
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ void CheckChatInvite(
|
||||
}
|
||||
}
|
||||
});
|
||||
}, [=](const RPCError &error) {
|
||||
}, [=](const MTP::Error &error) {
|
||||
if (error.code() != 400) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -33,6 +33,7 @@ struct SendAction {
|
||||
MsgId replyTo = 0;
|
||||
bool clearDraft = true;
|
||||
bool generateLocal = true;
|
||||
MsgId replaceMediaOf = 0;
|
||||
};
|
||||
|
||||
struct MessageToSend {
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 ¤tRights);
|
||||
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;
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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)) {
|
||||
|
||||
@@ -668,7 +668,7 @@ void EditColorBox::Field::changeValue(int delta) {
|
||||
setText(QString::number(newValue));
|
||||
setFocus();
|
||||
selectAll();
|
||||
emit changed();
|
||||
changed();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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*>>{
|
||||
|
||||
@@ -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)) {
|
||||
|
||||