Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update User-Agent for DNS to Chrome 119.0.6045.159. #3

Open
wants to merge 350 commits into
base: tdx
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
350 commits
Select commit Hold shift + click to select a range
0812816
Fix chat restrictions parsing.
john-preston Dec 8, 2021
0b390aa
Mark mentions as read on the client side as well.
john-preston Dec 8, 2021
4772ff8
Allow zero PeerId() in SendAsPeers::setChosen.
john-preston Dec 8, 2021
7141ca8
Handle default send-as updates.
john-preston Dec 8, 2021
422cdae
Apply message pin status updates.
john-preston Dec 8, 2021
ae24002
Apply views / replies updates from TDLib.
john-preston Dec 8, 2021
0d3f20d
Pin / unpin messages.
john-preston Dec 8, 2021
bc1b43b
Migrated data_chat_participant_status from MTP to TDLib.
23rd Nov 21, 2021
f075575
Migrated Api::ChatParticipants from MTP to TDLib.
23rd Nov 21, 2021
4526492
Migrated AddSpecialBoxController from MTP to TDLib.
23rd Nov 21, 2021
445cb4a
Migrated edit_participants_box from MTP to TDLib.
23rd Nov 21, 2021
5a271e2
Migrated Admin Log from MTP to TDLib.
23rd Nov 21, 2021
41e9583
Migrated transfer of chat ownership from MTP to TDLib.
23rd Nov 21, 2021
90ba610
Migrated EditPeerInfoBox from MTP to TDLib.
23rd Nov 21, 2021
b4f79da
Migrated EditContactBox from MTP to TDLib.
23rd Nov 26, 2021
1337255
Migrated conversion to gigagroup from MTP to TDLib.
23rd Nov 26, 2021
cab8144
Migrated checking of channel username from MTP to TDLib.
23rd Nov 26, 2021
62e7273
Migrated AdminsController from MTP to TDLib.
23rd Nov 26, 2021
6cd7be5
Migrated management of invite links from MTP to TDLib.
23rd Nov 27, 2021
13dbcda
Migrated GroupInfoBox from MTP to TDLib.
23rd Nov 27, 2021
58c99d3
Migrated SetupChannelBox from MTP to TDLib.
23rd Nov 27, 2021
b304a49
Fixed uploading of profile photo for groups and channels.
23rd Nov 28, 2021
374f7e7
Fixed PeerListGlobalSearchController request.
23rd Nov 28, 2021
fec322d
Migrated chat migration to supergroup from MTP to TDLib.
23rd Nov 28, 2021
9e3dfbc
Migrated sending of callback query to bots from MTP to TDLib.
23rd Nov 28, 2021
dae5857
Replaced Ui::FormatPhone with Tdb::FormatPhone.
23rd Nov 28, 2021
8027ee9
Migrated Countries::Manager from MTP to TDLib.
23rd Nov 28, 2021
3983332
Migrated generating groups of phone patterns from MTP to TDLib.
23rd Nov 28, 2021
4719462
Update TDLib to 1.8.1.
john-preston Feb 2, 2022
f8d9116
Fix possible crash in Tdb streaming.
john-preston Feb 2, 2022
adab27c
Track available reactions list.
john-preston Feb 4, 2022
e189f6d
Track message reactions. Cut out some code.
john-preston Feb 4, 2022
7be0b1e
Fix possible crash in file downloader.
john-preston Feb 4, 2022
096ae0f
Add sending reactions to messages.
john-preston Feb 4, 2022
049be8a
Load list of unread reactions.
john-preston Feb 4, 2022
c3a3120
Migrate support chat preload to TDLib.
john-preston Feb 10, 2022
0485d0a
Migrate favorite reaction read / write to TDLib.
john-preston Feb 10, 2022
4c36d3d
Migrate edit chat reactions / read all reactions to TDLib.
john-preston Feb 10, 2022
304e72b
Migrate WhoRead / WhoReacted to TDLib.
john-preston Feb 10, 2022
f76dc36
Rebase and fix the build.
john-preston Mar 10, 2022
dac67cc
Update TDLib to 1.8.2 and fix the build.
john-preston Mar 16, 2022
7f60b41
Fix RTMP streams using TDLib.
john-preston Mar 16, 2022
332bce3
Migrate toggleHistoryArchived to TDLib.
john-preston Mar 17, 2022
6fdbfa1
Migrate some stickers management to TDLib.
john-preston Mar 21, 2022
a373662
Migrate block from replies / reportSpam to TDLib.
john-preston Mar 21, 2022
18e2864
Fix build after rebase.
john-preston Apr 11, 2022
4173259
Resolve username / phone / message links.
john-preston Apr 20, 2022
4ea30b3
Request the comments thread information.
john-preston Apr 21, 2022
b6e1744
Migrate unpin all messages to TDLib.
john-preston Apr 27, 2022
d8785af
Migrate scheduled messages to TDLib.
john-preston Apr 27, 2022
e5663b6
Migrate sending inline bot results to TDLib.
john-preston Jun 21, 2022
90247c0
Update TDLib to 1.8.4 and fix td_tdb target build.
john-preston Jun 21, 2022
8af4529
Set botInfo for users.
john-preston Jul 5, 2022
4a960ad
Migrate deleteChatHistory to TDLib.
john-preston Jul 5, 2022
8b41c21
Rebase onto v4.0.2.
john-preston Jul 19, 2022
9537c46
Show correct set title in StickerToast.
john-preston Jul 20, 2022
187289b
Fix logging in with a 2sv password.
john-preston Jul 20, 2022
5f4a04d
Use scoped Tdb::Sender for a Main::Session.
john-preston Jul 20, 2022
5d6dc22
Use domain _localKey for Tdb encryption.
john-preston Jul 20, 2022
8ad2c14
Fix flickering online members count.
john-preston Jul 20, 2022
7eedda4
Migrate mute / notification sound settings to TDLib.
john-preston Jul 21, 2022
256f748
Migrate peer settings / contact status to TDLib.
john-preston Jul 28, 2022
cdc5818
Migrated ability to start livestream with RTMP from MTP to TDLib.
23rd May 12, 2022
f1b063c
Migrated Api::Ringtones from MTP to TDLib.
23rd May 12, 2022
58578c5
Migrated ShareBox from MTP to TDLib.
23rd May 13, 2022
fe1f73c
Migrated sharing of bot game from MTP to TDLib.
23rd May 13, 2022
330e49a
Migrated ability to use previous peer userpics from MTP to TDLib.
23rd May 13, 2022
1b68670
Migrated ttl support from MTP to TDLib.
23rd May 13, 2022
1db9963
Migrated toggling media from MTP to TDLib.
23rd May 13, 2022
baad508
Migrated support of saved GIFs from MTP to TDLib.
23rd May 13, 2022
35ab58d
Migrated support of bot commands from MTP to TDLib.
23rd May 14, 2022
59c63a7
Migrated draft support from MTP to TDLib.
23rd May 15, 2022
9262b41
Migrated requesting of full peer info from MTP to TDLib.
23rd May 16, 2022
4d8cc0f
Completely migrated cloud password from MTP to TDLib after redesign.
23rd Jul 31, 2022
9dbc514
Fixed build after rebase.
23rd Jul 31, 2022
ec47749
Implement leaving channels through TDLib.
john-preston Jul 31, 2022
d76bab6
Request webpage preview through TDLib.
john-preston Aug 2, 2022
92da914
Implement text / caption edit using TDLib.
john-preston Aug 5, 2022
71df0b6
Cut some more MTP + getMessage + reschedule.
john-preston Aug 5, 2022
a8cbb36
Migrate reporting to TDLib.
john-preston Aug 5, 2022
2eb6b37
Send stickers / GIFs / dices.
john-preston Aug 5, 2022
2c11bde
Request recent / featured / faved stickers from TDLib.
john-preston Aug 5, 2022
25ec797
Send bot start through TDLib.
john-preston Aug 5, 2022
ae97c9d
Migrate forwardMessages call to TDLib.
john-preston Aug 5, 2022
f6251ac
Fill dice / slot machine stickers from TDLib.
john-preston Aug 8, 2022
a19c1f8
Check photo null-ness not by date field.
john-preston Aug 8, 2022
fde3f3a
Process full chat photos, userpic videos.
john-preston Aug 10, 2022
44ded50
Migrate invite link check / join to TDLib.
john-preston Aug 10, 2022
39ad833
Cut out a lot more of MTP code.
john-preston Aug 10, 2022
e1c4a8b
Remove MTP::Sender from ApiWrap interface.
john-preston Aug 10, 2022
f3e3e87
Remove MTP::Sender completely.
john-preston Aug 10, 2022
7cff57e
Migrate AttachWebView to TDLib.
john-preston Aug 10, 2022
04efbad
Read CanDeleteForAll and CanEdit from TDLib.
john-preston Aug 10, 2022
a63e6c0
Fix sending screenshots and photos.
john-preston Aug 10, 2022
79fe02b
Remove tdb_tl_scheme include from headers.
john-preston Aug 11, 2022
8037381
Migrated some types of inline bot results from MTP to TDLib.
23rd May 15, 2022
ecc5bdc
Migrated user photos from MTP to TDLib.
23rd May 16, 2022
79c5f93
Migrated shared media from MTP to TDLib.
23rd May 16, 2022
867d8d4
Fix build.
john-preston Aug 12, 2022
e7bce9c
Use local copy of td_api.tl scheme.
john-preston Aug 14, 2022
ed7c5e0
Update TDLib to 1.8.5 and fix the build.
john-preston Aug 15, 2022
93100b2
Migrated flags for full user info from MTP to TDLib.
23rd Aug 16, 2022
2cae6ef
Migrated polls support from MTP to TDLib.
23rd Aug 17, 2022
db143cd
Migrated AddContactBox from MTP to TDLib.
23rd Aug 17, 2022
d3252e1
Migrated dummy user for quick reactions settings from MTP to TDLib.
23rd Aug 17, 2022
8bfc0db
Migrated ability to revoke RTMP credentials from MTP to TDLib.
23rd Aug 17, 2022
ea6fe92
Implement some // todo-s.
john-preston Sep 14, 2022
8101845
Fix build with MSVC.
john-preston Sep 14, 2022
7125654
Add gperf to instructions and prepare.
john-preston Sep 28, 2022
8d3dbce
Update TDLib to 1.8.6 and fix the build.
john-preston Sep 28, 2022
f8aef54
Resolve default reactions data from TDLib.
john-preston Sep 28, 2022
569750d
Always update available reactions async.
john-preston Sep 28, 2022
43a319e
Request possible reactions for a message.
john-preston Nov 3, 2022
e2533ab
Migrate (sort-of) chats filters to TDLib.
john-preston Nov 4, 2022
4cf7f22
Improve archive / main list chat tracking.
john-preston Nov 4, 2022
3fdae11
Fix sending spoilers.
john-preston Nov 9, 2022
fafe7a3
Improve stickers support.
john-preston Nov 9, 2022
267a09b
Improve tracking of unread messages.
john-preston Nov 9, 2022
6d16513
Migrate chats / messages search to TDLib.
john-preston Nov 10, 2022
1135441
Migrate typing sending to TDLib.
john-preston Nov 10, 2022
344ddd9
Unify cloud draft save / clear handling.
john-preston Nov 10, 2022
ff772b8
Abstract away MTP in SendActionPainter.
john-preston Dec 8, 2022
a2b2958
Handle some more updates.
john-preston Dec 8, 2022
010e83a
Show connecting state in the corner.
john-preston Dec 8, 2022
50b1515
Process connection state and incoming emoji interactions.
john-preston Dec 8, 2022
a416981
Update TDLib to 1.8.9 and fix the build.
john-preston Dec 11, 2022
4614707
Update TDLib revision with a bugfix.
john-preston Dec 23, 2022
972ddda
Send message thread loading requests.
john-preston Dec 23, 2022
4a520a6
Fix last message clearing, global messages search.
john-preston Dec 23, 2022
54deb69
Migrate jump-to-date to TDLib.
john-preston Dec 23, 2022
95ee78b
Migrate Api::MessagesSearch to TDLib.
john-preston Dec 25, 2022
82c20e8
Migrate SingleMessageSearch to TDLib.
john-preston Dec 26, 2022
33f2a33
Implement copy topic link.
john-preston Dec 26, 2022
2b56114
Migrate audio transcribe to TDLib.
john-preston Dec 26, 2022
2afb3c7
Migrate ChannelsLimitBox to TDLib.
john-preston Dec 26, 2022
de3f809
Migrate PublicLinksLimitBox to TDLib.
john-preston Dec 26, 2022
4a9e3f9
Fix self-destruct media display.
john-preston Dec 27, 2022
86fbff6
Migrate mark-as-read/unread to TDLib.
john-preston Dec 27, 2022
b3ccf3b
Use uniform "// later" and "// tdlib" comments.
john-preston Dec 27, 2022
1771464
Migrate unavailable reasons to TDLib.
john-preston Dec 27, 2022
043f3bf
Migrate aggressive antispam to TDLib.
john-preston Dec 27, 2022
98a6ebf
Support internal links through TDLib.
john-preston Dec 27, 2022
cc76260
Migrate premium state request to TDLib.
john-preston Dec 30, 2022
4a5786e
Fix phone formatting.
john-preston Dec 30, 2022
78be811
Wait for chat filters after logging in.
john-preston Dec 30, 2022
2cf5080
Update TDLib to 1.8.10 and fix the build.
john-preston Jan 3, 2023
6b1b562
Fix fragment phones logins.
john-preston Jan 4, 2023
30755a8
Implement purging invalid TDLib instances.
john-preston Jan 4, 2023
3724d37
Migrate backgrounds list and support user to TDLib.
john-preston Jan 11, 2023
9f2a170
Allow synchronous requests to Tdb::Instance.
john-preston Jan 11, 2023
711389b
Migrate premium sections order to TDLib.
john-preston Jan 11, 2023
fbb488f
Compose wallpaper link using TDLib.
john-preston Jan 11, 2023
04f9f9d
Migrate premium / gift payments to TDLib.
john-preston Jan 13, 2023
8419ead
Always apply unread count from update.
john-preston Jan 14, 2023
f3d7df3
Show near dates in a shorter format.
john-preston Jan 25, 2023
3cf3c9c
Fix upload progress display / cancel.
john-preston Feb 8, 2023
461b435
Support upload pause and map thumbnail download.
john-preston Feb 8, 2023
040c900
Migrate bot auto login / login buttons to TDLib.
john-preston Feb 8, 2023
c298a63
Handle terms of service accept requests.
john-preston Feb 9, 2023
b725376
Migrate custom chat themes to TDLib.
john-preston Feb 15, 2023
cde7ce6
Migrate background setting to TDLib.
john-preston Feb 15, 2023
cc9a083
Request page previews and inline bot results.
john-preston Feb 15, 2023
fa2973a
Rebase & Update TDLib to 1.8.11 & Fix the build.
john-preston Sep 15, 2023
ceec814
Correctly support animated single-emoji messages.
john-preston Feb 16, 2023
5c0a633
Migrate GIF search emoji sections to TDLib.
john-preston Feb 16, 2023
73908f5
Migrate sponsored messages to TDLib.
john-preston Feb 20, 2023
cea1258
Migrate game score display to TDLib.
john-preston Feb 20, 2023
bd41016
Migrate local changelogs to TDLib.
john-preston Feb 20, 2023
58168ec
Set some more chat fields from TDLib.
john-preston Feb 20, 2023
9e49a94
Use TDLib notifications API.
john-preston Feb 21, 2023
29f7306
Implement generating files by downloading from web.
john-preston Feb 22, 2023
a446d06
Migrate proxy management to TDLib.
john-preston Feb 22, 2023
ba9ffd2
Show group photo change recent action from TDLib.
john-preston Feb 22, 2023
32a48f5
Support recurring payment terms from TDLib.
john-preston Feb 22, 2023
82e8af6
Mark channel as forbidden locally.
john-preston Feb 22, 2023
072eb2d
Mark topic mentions / reactions as read.
john-preston Feb 22, 2023
bd4395e
Show connecting state in top bar widget.
john-preston Feb 22, 2023
13fdbfc
Just remove some more todo-s.
john-preston Feb 22, 2023
0060b44
Migrate emoji interactions through TDLib.
john-preston Feb 22, 2023
bba54bc
Migrate delete messages by date to TDLib.
john-preston Feb 22, 2023
3723c73
Migrate sponsored messages viewing to TDLib.
john-preston Feb 22, 2023
5f64e32
Remove folder dialogs entry request.
john-preston Feb 22, 2023
4394e41
Fix build with Visual Studio 17.5.1.
john-preston Mar 1, 2023
cd951b0
Fix comments, fix search in topic.
john-preston Mar 2, 2023
df0328d
Load albums around the last album-part message.
john-preston Mar 2, 2023
c8048df
Fix service messages in topics.
john-preston Mar 2, 2023
dc45c02
Allow Tdb::Sender::request(TL..., requestId).send()
john-preston Mar 2, 2023
771ab64
Migrate emoji keyword search to TDLib.
john-preston Mar 2, 2023
c02e3b1
Pause/unpause all Tdb while short animation plays.
john-preston Mar 2, 2023
ab4efa6
Support collages of media in webpage previews.
john-preston Mar 4, 2023
b8bf8b0
Remove setattributes(), add local DocumentData generation.
john-preston Mar 5, 2023
ffe4ddc
Don't try to implement fake last message for now.
john-preston Mar 9, 2023
c38bbc8
Track ConnectionState destructor for debugging.
john-preston Mar 9, 2023
031820a
Fix Downloads section with TDLib.
john-preston Mar 9, 2023
5768d6c
Use common language_pack_database_path.
john-preston Mar 9, 2023
c024cf1
Cancel chat actions only by chatActionCancel.
john-preston Mar 9, 2023
c18e477
Implement requestDialogEntry somehow for histories.
john-preston Mar 9, 2023
3107544
Update TDLib to 1.8.12 and fix the build.
john-preston Apr 26, 2023
06fc631
Request history / search with existing message ids.
john-preston Mar 16, 2023
ae8327c
Fix possible crash in Tdb unpausing.
john-preston Mar 16, 2023
3bcd16d
Implement sending animations for stickers / gifs.
john-preston Mar 16, 2023
876213c
Remove verbose logging in streaming Tdb loader.
john-preston Mar 17, 2023
fbf9c88
Always pass "use_pfs" option.
john-preston Mar 17, 2023
a6cfb0c
Use t_me_url option.
john-preston Mar 17, 2023
c19c0c0
Stick to an explicit TDLib commit in Dockerfile.
john-preston Mar 18, 2023
fdd7591
[tdx] Update cmake_helpers, lib_base submodules.
john-preston Mar 18, 2023
9a4b131
[tdx] Use a distinct backup folder.
john-preston Mar 18, 2023
f9ad696
Fix build on macOS.
john-preston Mar 20, 2023
9e902a8
[tdx] Use new setup / update file names.
john-preston Mar 22, 2023
23bef58
Migrate support user info to TDLib.
john-preston Mar 22, 2023
eca328b
Support separate screencast audio ssrc.
john-preston Mar 22, 2023
2b297cc
Fix working after abnormal TDLib closing.
john-preston Mar 22, 2023
5783785
Update code for chatId <> peerId conversions.
john-preston Mar 22, 2023
5d45687
Migrate cloud changelogs to TDLib.
john-preston Mar 23, 2023
3825f0d
Proof-of-concept secret chat implementation.
john-preston Mar 22, 2023
c1976e7
Show key fingerprint image.
john-preston Mar 22, 2023
76cb089
Don't use negative UserId as a flag.
john-preston Mar 24, 2023
ae02d3b
Migrated dedicated file loader to TDLib.
john-preston Mar 24, 2023
a17419a
[tdx] Force portable or distinct appdata path.
john-preston Apr 11, 2023
3ea8fe7
Mark td_tdb target as non-host in macOS build.
john-preston Apr 11, 2023
84ea7ca
[tdx] Don't build and deploy Windows setup.
john-preston Apr 11, 2023
5f6773d
[tdx] Use Tdx.app name in macOS dmg setup.
john-preston Apr 11, 2023
166d50c
[tdx] Fix build in Docker.
john-preston Apr 11, 2023
43bd6b8
[tdx] Update deploy script to use correct folder.
john-preston Apr 11, 2023
e99fbe8
Update TDLib to 1.8.14 and fix the build.
john-preston Apr 25, 2023
e5ab034
Mess less with unread count from TDLib.
john-preston Apr 26, 2023
9888234
Select first emoji suggestion result.
john-preston Apr 26, 2023
dadcc99
Allow calling between accounts of the same app.
john-preston Apr 26, 2023
85ccc63
Display connecting / updating state in title.
john-preston Apr 26, 2023
9b1ddd5
Update TDLib to 1.8.15 and fix the build.
john-preston Jul 26, 2023
64d7835
Fix media caption editing.
john-preston Jul 27, 2023
73bf041
Fix login with a phone number.
john-preston Jul 27, 2023
da54665
Fix attach bot icons loaded to local files.
john-preston Jul 28, 2023
6608fe4
Support entering code from email on test server.
john-preston Jul 28, 2023
0d86555
Update TDLib to 1.8.16 and fix the build.
john-preston Aug 16, 2023
4491e44
Use canRevokeFullHistory from TDLib.
john-preston Aug 16, 2023
79ca72a
Fix pinned messages bar appearance.
john-preston Aug 16, 2023
9fac3b5
Fix showing last message as pinned.
john-preston Aug 16, 2023
013bebd
Fix admin log media opening.
john-preston Aug 16, 2023
24fff25
Fix message delete revoke checkbox.
john-preston Aug 16, 2023
330b6f0
Update TDLib to 1.8.18 and fix the build.
john-preston Sep 15, 2023
6d2c2e3
[tdx] Version 4.9.7.
john-preston Sep 15, 2023
0a78db4
Update TDLib to 1.8.19.
john-preston Sep 26, 2023
a0e4db2
[tdx] Version 4.10.1.
john-preston Sep 26, 2023
89c67dd
Update TDLib to 1.8.21.
john-preston Nov 17, 2023
e374534
Migrated API for channel statistics from MTP to TDLib.
23rd Nov 17, 2023
d5b3b89
Migrated API for boosts from MTP to TDLib.
23rd Nov 17, 2023
7863556
Migrated API for giveaways from MTP to TDLib.
23rd Nov 17, 2023
dcd7e78
[tdx] Version 4.8.11.
john-preston Nov 18, 2023
1e798d1
Update User-Agent for DNS to Chrome 119.0.6045.159.
actions-user Dec 1, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
9 changes: 9 additions & 0 deletions Telegram/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ include(cmake/td_export.cmake)
include(cmake/td_mtproto.cmake)
include(cmake/td_lang.cmake)
include(cmake/td_scheme.cmake)
include(cmake/td_tdb.cmake)
include(cmake/td_ui.cmake)
include(cmake/generate_appdata_changelog.cmake)

Expand Down Expand Up @@ -65,6 +66,7 @@ PRIVATE
tdesktop::td_mtproto
tdesktop::td_lang
tdesktop::td_scheme
tdesktop::td_tdb
tdesktop::td_ui
desktop-app::lib_webrtc
desktop-app::lib_base
Expand Down Expand Up @@ -548,6 +550,8 @@ PRIVATE
data/data_reply_preview.h
data/data_search_controller.cpp
data/data_search_controller.h
data/data_secret_chat.cpp
data/data_secret_chat.h
data/data_send_action.cpp
data/data_send_action.h
data/data_session.cpp
Expand Down Expand Up @@ -1054,6 +1058,8 @@ PRIVATE
media/streaming/media_streaming_loader_local.h
media/streaming/media_streaming_loader_mtproto.cpp
media/streaming/media_streaming_loader_mtproto.h
media/streaming/media_streaming_loader_tdb.cpp
media/streaming/media_streaming_loader_tdb.h
media/streaming/media_streaming_player.cpp
media/streaming/media_streaming_player.h
media/streaming/media_streaming_reader.cpp
Expand Down Expand Up @@ -1123,6 +1129,7 @@ PRIVATE
overview/overview_layout.cpp
overview/overview_layout.h
overview/overview_layout_delegate.h
passport/passport_common.h
passport/passport_encryption.cpp
passport/passport_encryption.h
passport/passport_form_controller.cpp
Expand Down Expand Up @@ -1321,6 +1328,8 @@ PRIVATE
storage/file_download.h
storage/file_download_mtproto.cpp
storage/file_download_mtproto.h
storage/file_download_tdb.cpp
storage/file_download_tdb.h
storage/file_download_web.cpp
storage/file_download_web.h
storage/file_upload.cpp
Expand Down
6 changes: 3 additions & 3 deletions Telegram/SourceFiles/_other/packer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -493,11 +493,11 @@ int main(int argc, char *argv[])
cout << "Signature verified!\n";
RSA_free(pbKey);
#ifdef Q_OS_WIN
QString outName((targetwin64 ? QString("tx64upd%1") : QString("tupdate%1")).arg(AlphaVersion ? AlphaVersion : version));
QString outName((targetwin64 ? QString("update-win-x64-%1") : QString("update-win-x86-%1")).arg(AlphaVersion ? AlphaVersion : version));
#elif defined Q_OS_MAC
QString outName((targetarmac ? QString("tarmacupd%1") : QString("tmacupd%1")).arg(AlphaVersion ? AlphaVersion : version));
QString outName((targetarmac ? QString("update-mac-arm-%1") : QString("update-mac-x64-%1")).arg(AlphaVersion ? AlphaVersion : version));
#else
QString outName(QString("tlinuxupd%1").arg(AlphaVersion ? AlphaVersion : version));
QString outName(QString("update-linux-x64-%1").arg(AlphaVersion ? AlphaVersion : version));
#endif
if (AlphaVersion) {
outName += "_" + AlphaSignature;
Expand Down
65 changes: 65 additions & 0 deletions Telegram/SourceFiles/api/api_attached_stickers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,20 @@ For license and copyright information please follow this link:
#include "lang/lang_keys.h"
#include "window/window_session_controller.h"

#include "tdb/tdb_tl_scheme.h"

namespace Api {

using namespace Tdb;

AttachedStickers::AttachedStickers(not_null<ApiWrap*> api)
#if 0 // mtp
: _api(&api->instance()) {
#endif
: _api(api) {
}

#if 0 // mtp
void AttachedStickers::request(
not_null<Window::SessionController*> controller,
MTPmessages_GetAttachedStickers &&mtpRequest) {
Expand Down Expand Up @@ -70,23 +78,80 @@ void AttachedStickers::request(
}
}).send();
}
#endif

void AttachedStickers::request(
not_null<Window::SessionController*> controller,
FileId fileId) {
const auto weak = base::make_weak(controller.get());
_api->sender().request(_requestId).cancel();
_requestId = _api->sender().request(TLgetAttachedStickerSets(
tl_int32(fileId)
)).done([=](const TLstickerSets &result) {
_requestId = 0;
const auto strongController = weak.get();
if (!strongController) {
return;
}
const auto &data = result.data();
const auto &list = data.vsets().v;
if (list.isEmpty()) {
strongController->show(
Ui::MakeInformBox(tr::lng_stickers_not_found()));
return;
} else if (list.size() > 1) {
strongController->show(
Box<StickersBox>(
strongController->uiShow(),
data.vsets().v));
return;
}
// Single attached sticker pack.
const auto setId = StickerSetIdentifier{
.id = uint64(list.front().data().vid().v),
};
strongController->show(
Box<StickerSetBox>(
strongController->uiShow(),
setId,
Data::TypeFromTL(list.front().data().vsticker_type())),
Ui::LayerOption::KeepOther);
}).fail([=] {
_requestId = 0;
if (const auto strongController = weak.get()) {
strongController->show(
Ui::MakeInformBox(tr::lng_stickers_not_found()));
}
}).send();
}

void AttachedStickers::requestAttachedStickerSets(
not_null<Window::SessionController*> controller,
not_null<PhotoData*> photo) {
#if 0 // mtp
request(
controller,
MTPmessages_GetAttachedStickers(
MTP_inputStickeredMediaPhoto(photo->mtpInput())));
#endif
const auto &location = photo->location(Data::PhotoSize::Large).file();
if (const auto tdb = std::get_if<TdbFileLocation>(&location.data)) {
request(controller, tdb->fileId);
}
}

void AttachedStickers::requestAttachedStickerSets(
not_null<Window::SessionController*> controller,
not_null<DocumentData*> document) {
#if 0 // mtp
request(
controller,
MTPmessages_GetAttachedStickers(
MTP_inputStickeredMediaDocument(document->mtpInput())));
#endif
if (const auto fileId = document->tdbFileId()) {
request(controller, fileId);
}
}

} // namespace Api
11 changes: 11 additions & 0 deletions Telegram/SourceFiles/api/api_attached_stickers.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ For license and copyright information please follow this link:

#include "mtproto/sender.h"

#include "tdb/tdb_request_id.h"

class ApiWrap;
class DocumentData;
class PhotoData;
Expand All @@ -32,12 +34,21 @@ class AttachedStickers final {
not_null<DocumentData*> document);

private:
#if 0 // mtp
void request(
not_null<Window::SessionController*> controller,
MTPmessages_GetAttachedStickers &&mtpRequest);

MTP::Sender _api;
mtpRequestId _requestId = 0;
#endif

void request(
not_null<Window::SessionController*> controller,
FileId fileId);

const not_null<ApiWrap*> _api;
Tdb::RequestId _requestId;

};

Expand Down
Loading