Compare commits

...

630 Commits

Author SHA1 Message Date
John Preston
277d76df3e Version 5.10.2: Update Qt patches on Linux. 2025-01-08 17:42:51 +04:00
John Preston
1ac33d30bd Version 5.10.2: Improve gifts layout. 2025-01-08 17:36:45 +04:00
23rd
658cb438f8 Added spoiler entity to email pattern in recover box. 2025-01-08 14:25:40 +03:00
23rd
2b71625ffe Moved out part of common code for cloud password to td_ui. 2025-01-08 14:25:40 +03:00
23rd
2b13fc9a24 Slightly simplified Intro::Step::setDescriptionText. 2025-01-08 14:25:40 +03:00
23rd
9e18964e7f Added spoiler entity to email pattern in intro and cloud password. 2025-01-08 14:25:40 +03:00
23rd
43dfe559a6 Added simple context for marked text. 2025-01-08 10:58:56 +03:00
23rd
aab7ba264c Added ability to open peers in window with middle button from contacts. 2025-01-07 23:45:23 +03:00
23rd
b7162b5fad Added ability to open recent peers in window with middle button. 2025-01-07 23:45:23 +03:00
23rd
ce4a081155 Added initial ability to handle middle button in peer lists. 2025-01-07 23:45:23 +03:00
23rd
5df2a048e1 Fixed ability to copy selected text with presented compose search. 2025-01-07 23:12:49 +03:00
23rd
1b6a7fafa8 Added ability to instantly delete account in test DC. 2025-01-07 23:12:49 +03:00
23rd
2ab725e5e1 Added patch for colors of strikeout format to Linux. 2025-01-07 23:12:49 +03:00
John Preston
88a310a86e Version 5.10.2: Hide unique gift userpic. 2025-01-07 21:31:06 +04:00
John Preston
86319be256 Version 5.10.2.
- Fix double verification badge in profiles.
2025-01-07 21:23:42 +04:00
John Preston
9d68ef6421 Fix bot verification showing second check. 2025-01-07 20:59:52 +04:00
John Preston
2bb1c5d39b Show verify badge on Verifications Codes. 2025-01-07 20:59:17 +04:00
John Preston
3aa15c979d Version 5.10.1.
- Show "Boost group the send messages" information.
- Fix several gifts bugs and glitches.
- Fix several crashes.
2025-01-06 21:42:23 +04:00
John Preston
c062ba3426 Fix possible crash in sticker click. 2025-01-06 21:42:23 +04:00
John Preston
343560225c Fix crash in QR code copy on scale < 100. 2025-01-06 21:42:23 +04:00
John Preston
e0dd77f0c3 Fix possible crash in forward box. 2025-01-06 21:42:23 +04:00
John Preston
92ff07f723 Fix possible crash in message translation. 2025-01-06 21:42:23 +04:00
John Preston
a23dca080a Always show "View" button in gifts. 2025-01-06 21:42:23 +04:00
John Preston
6844f88567 Improve gift layout. 2025-01-06 21:42:23 +04:00
John Preston
e6060ea277 Improve gift corner badge display. 2025-01-06 21:42:23 +04:00
John Preston
549de7fa54 Show both verify and status emoji in opened chat. 2025-01-06 21:42:23 +04:00
John Preston
ecf9faa21d Fix usernames and QR overlap. 2025-01-06 21:42:23 +04:00
John Preston
a87ebd41e7 Fix reactions for call messages. 2025-01-06 21:42:23 +04:00
John Preston
183dd40f39 Improve gift phrases usage. 2025-01-06 21:42:23 +04:00
John Preston
c722c5c46f Improve gift pattern transparency. 2025-01-06 21:42:23 +04:00
John Preston
865200db5e Improve custom verification icon display. 2025-01-06 21:42:23 +04:00
John Preston
c3e15de759 Don't show Downloads if it's empty in search. 2025-01-06 21:42:23 +04:00
John Preston
44bfdbdc83 Add global search chat type filter. 2025-01-06 21:42:23 +04:00
John Preston
5f10c1875c Ask for boosts to unlock group restrictions. 2025-01-06 21:42:23 +04:00
23rd
a7ae7a8cda Slightly improved fade effect in price categories from star gift box. 2025-01-06 20:40:17 +03:00
23rd
706f142a98 Slightly improved ripple animation for button to gift credits. 2025-01-06 20:40:17 +03:00
23rd
08df3b2dff Removed unused badge in giveaway box. 2025-01-06 20:40:17 +03:00
23rd
14672ff145 Excluded cases of divisions by zero in dates from statistics charts. 2025-01-06 20:40:17 +03:00
Nikolai Nechaev
7fcd84d08e Fix handling of notification disappearing under cursor
Previously, notifications disappearing under cursor (e.g., because closed
manually or open from another device) did not notify the manager
properly, as the leaveEventHook was not triggered. This could lead to
notifications staying around when not supposed to (see #28813).

This commit fixes that by explicitly notifying manager when the
notification widget disappears under the cursor.

Fixes #28813.
2025-01-06 09:51:09 +04:00
dependabot[bot]
12f8686326 Bump jinja2 from 3.1.4 to 3.1.5 in /Telegram/build/docker/centos_env
Bumps [jinja2](https://github.com/pallets/jinja) from 3.1.4 to 3.1.5.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/jinja/compare/3.1.4...3.1.5)

---
updated-dependencies:
- dependency-name: jinja2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-06 09:48:00 +04:00
John Preston
aa445adfff Fix possible crash in ListWidget destructor. 2025-01-04 22:00:38 +04:00
John Preston
603aa5db5f Version 5.10: Fix build with GCC. 2025-01-02 12:23:07 +04:00
John Preston
c34289036f Version 5.10: Show folder tags premium promo. 2025-01-02 11:25:08 +04:00
John Preston
5b6bec775b Version 5.10: Fix build with Xcode. 2025-01-02 11:02:33 +04:00
John Preston
3b0fe3043f Version 5.10.
- Collectible Gifts.
- Reactions for Service Messages.
- Verification from Third Parties.
- Custom Emoji in Folder Names.
2025-01-02 10:54:50 +04:00
GitHub Action
c99165891f Update copyright year to 2025. 2025-01-02 10:48:21 +04:00
John Preston
4938b18f9d Fix display of gifts from bots. 2025-01-02 10:47:37 +04:00
John Preston
8895b4e8a3 Implement buying gifts for myself. 2024-12-31 21:40:18 +04:00
John Preston
a7321c9beb Return native verify icon to the right. 2024-12-31 17:18:59 +04:00
John Preston
c23b533704 Hide shared media layer when jumping to message. 2024-12-31 16:44:22 +04:00
John Preston
de34c75788 Support custom emoji in folder menus. 2024-12-31 16:29:10 +04:00
John Preston
06341efe0d Allow disabling animations in folder emoji. 2024-12-31 15:41:13 +04:00
John Preston
c810005f86 Don't parse empty messages in channels. 2024-12-31 13:44:52 +04:00
John Preston
cdedf283ac Show correct topic buttons in admin log. 2024-12-31 13:12:16 +04:00
John Preston
acfd92e2e6 Display emoji correctly in folder tags. 2024-12-31 13:12:16 +04:00
John Preston
51b81dba87 Fix animated side buttons with locks. 2024-12-31 13:12:16 +04:00
John Preston
7f6dfcf52f Improve new gift transactions a bit. 2024-12-31 13:12:16 +04:00
John Preston
92582d8434 Implement refunded upgraded gift view. 2024-12-31 13:12:16 +04:00
John Preston
e2bff474db Show upgraded gift from old "View" button. 2024-12-31 13:12:15 +04:00
John Preston
4f702e12b7 Improve upgrade/transfer toasts. 2024-12-31 13:12:15 +04:00
John Preston
083400d1c2 Implement unique gift transfer. 2024-12-31 13:12:15 +04:00
John Preston
7491337bfd Show forward original date for edited items. 2024-12-31 13:12:15 +04:00
John Preston
d6b833fbb2 Add icons for gift upgrading. 2024-12-31 13:12:15 +04:00
John Preston
2113a2b634 Implement nice unique gifts in the list. 2024-12-31 13:12:15 +04:00
John Preston
5df632264f Allow pay for upgrade when sending. 2024-12-31 13:12:15 +04:00
John Preston
42c350243a Implement unique gift view box. 2024-12-31 13:12:15 +04:00
John Preston
522ca3b04a Pause gift view ministars in an inactive window. 2024-12-31 13:12:15 +04:00
John Preston
2d53ec5d34 Implement unique gift view in chat. 2024-12-31 13:12:15 +04:00
John Preston
13d2f70c3a Implement upgraded unique gifts. 2024-12-31 13:12:15 +04:00
John Preston
a87d19998e Support bot verifications without modify access. 2024-12-31 13:12:15 +04:00
John Preston
6ddf241293 Update API scheme on layer 196. 2024-12-31 13:12:15 +04:00
John Preston
e43ec6c4ea Add unique gift phrases. 2024-12-31 13:12:15 +04:00
John Preston
5f3db95cbd Parse unique gift fields. 2024-12-31 13:12:15 +04:00
John Preston
d874829b06 Start animating emoji in filter titles. 2024-12-31 13:12:15 +04:00
John Preston
6cfbccd955 Handle report_delivery_until_date. 2024-12-25 11:09:35 +04:00
John Preston
0d821c3630 Implement simple bot verification management. 2024-12-25 11:09:35 +04:00
John Preston
b61e3b580d Return chat type icons. 2024-12-25 11:09:35 +04:00
John Preston
5c301353ec Improve verified badge display. 2024-12-25 11:09:35 +04:00
John Preston
0363421862 Apply server side bot verifications. 2024-12-25 11:09:35 +04:00
John Preston
6f18b9b691 Proof-of-concept custom verify badges. 2024-12-25 11:09:35 +04:00
John Preston
35e40be550 Support service messages reactions. 2024-12-25 11:09:35 +04:00
John Preston
c1528f532e Update API scheme to layer 196. 2024-12-25 11:09:35 +04:00
John Preston
4505a2bf2d Beta version 5.9.2.
- Fix some jump-to-message highlightings.
- Fix some long round video messages sending.
- Fix possible crash in global photos / videos.
- Fix streaming starting for some large video files.
- Fix possible drop of top peers / recent chats cache.
- Fix possible crashes in audio on macOS (rollback OpenAL).
2024-12-24 10:44:15 +04:00
John Preston
a314380b08 Rollback OpenAL on macOS. 2024-12-23 22:51:33 +04:00
John Preston
0c07a015c6 Always show VIEW DISCUSSION from comments. 2024-12-23 22:46:43 +04:00
John Preston
a0c7697280 Fix affiliate program ending confirmation box.
Fixes #28780.
2024-12-23 22:46:42 +04:00
John Preston
04023da723 Highlight search query part in separate window chat. 2024-12-23 21:29:40 +04:00
John Preston
13ea045055 Fix collision of dice_sticker last frames. 2024-12-23 21:29:40 +04:00
John Preston
f03351d112 Allow filter gifts by "In Stock". 2024-12-23 21:29:40 +04:00
John Preston
48d9f10f5b Improve message part highlighting. 2024-12-23 21:29:39 +04:00
John Preston
2b53df98cd Fix long message parts highlighting in topics. 2024-12-23 21:29:34 +04:00
John Preston
99a7a13218 Always send video messages as not "big" files. 2024-12-23 21:27:12 +04:00
John Preston
2d2d4ac002 Reduce video message bitrate so they always fit. 2024-12-23 21:27:12 +04:00
John Preston
d12e8023e3 Fix scheduled replies loading. 2024-12-23 21:27:12 +04:00
John Preston
17181cee8f Fix possible crash in Forward folders switch. 2024-12-23 21:27:12 +04:00
23rd
a74ee911b3 Removed chats filters strip from forward box while search. 2024-12-23 11:02:09 +04:00
Ilya Fedin
b0b37172ce Fix the naming of TitleControlsLayout static methods 2024-12-23 11:01:35 +04:00
Pavel Zolotarevskiy
cccf048e3f Don't export a duplicate "text" field on star gift
Fixes #28781
2024-12-21 22:32:12 +04:00
John Preston
82e890746b Fix possible crash in global media search. 2024-12-20 21:07:20 +04:00
John Preston
188d65d700 Improve streaming of large files. 2024-12-20 21:07:20 +04:00
John Preston
4569f93e70 Fix username disappearance in My Profile. 2024-12-20 21:07:20 +04:00
23rd
bcd1d8461f Added ability to open context menu for active account from main menu. 2024-12-20 19:33:06 +03:00
23rd
183a9139f9 Moved out ability to mark as read all chats from hidden shortcut. 2024-12-20 19:33:06 +03:00
23rd
80a1e6ecf3 Fixed ability to mark as read all chats for wrong account. 2024-12-20 19:33:06 +03:00
23rd
aa1f8cfb8f Fixed display at least one injected sponsored message. 2024-12-20 15:53:43 +03:00
23rd
8060691f3d Fixed preview of chats filters in filter link box when window is small. 2024-12-19 15:54:26 +03:00
Ilya Fedin
bf26de495a Adapt to TitleControlsLayout change 2024-12-19 15:59:25 +04:00
Ilya Fedin
73b3f7e298 Adapt to TitleControlsOnLeft change 2024-12-19 15:59:25 +04:00
Ilya Fedin
22191649aa Update lib_base and lib_ui 2024-12-19 15:59:25 +04:00
bitxer
0557907310 Enhance experimental setting description 2024-12-19 15:49:24 +04:00
bitxer
0f283c484d Added experimental settings to prefer ipv6 when it is available 2024-12-19 15:49:24 +04:00
John Preston
e33ca9d316 Fix top/recent peers cache write error. 2024-12-19 13:51:47 +04:00
John Preston
f93f4c72f7 Beta version 5.9.1.
- Add global media overview tabs in chats search.
- Add main menu "My Profile" with my stories and gifts access.
- Highlight some of search query on result message open.
- Fix highlighting quotes from bottom parts of long messages.
- Allow forward and reply bars together.
- Make gift price categories scrollable.
- Auto-send deep-link /start in existing bot chats.
2024-12-18 19:12:12 +04:00
23rd
f0b9bc10c2 Added fade effect to price categories in star gift box. 2024-12-18 17:39:46 +03:00
John Preston
f583879aee Update OpenAL to 1.24.1 on Windows/macOS. 2024-12-18 18:22:54 +04:00
23rd
7ea6c6c84b Fixed width of username label with button for QR in profiles. 2024-12-18 16:21:07 +03:00
23rd
2532a0ff59 Moved out to single place ministars creation in top of box. 2024-12-18 15:47:57 +03:00
23rd
c3f354826d Fixed text color of custom icon in some phrases with links. 2024-12-18 15:01:57 +03:00
23rd
6d1e421ad7 Fixed color of strikeout format when spellcheck underline is present. 2024-12-18 11:54:26 +03:00
23rd
29b0055e39 Slightly improved some phrases on error while add participant to chat. 2024-12-18 11:03:44 +03:00
Ilya Fedin
2cb20fe342 Switch macOS packaged action to latest ffmpeg 2024-12-18 10:53:43 +04:00
Ilya Fedin
fc97fa4415 Fix snap action 2024-12-18 09:56:23 +04:00
Ilya Fedin
876a50f759 Update OpenAL to 1.24.1 on Linux 2024-12-18 09:55:58 +04:00
Ilya Fedin
eb0d2868f5 Expand "always run in background" behavior from GNOME/Pantheon to all Linux
Right now it checks the title controls layout that is typically set only by gtk based DEs and KDE matching the GNOME's and Pantheon's defaults.

There are more and more reports about window manager not to supporting both tray and minimization out of the box and title controls layout seem to typically be either unset or set to nothing leaving users with no way to run tdesktop with no window open.
2024-12-18 09:55:35 +04:00
John Preston
e215d5bc64 Fix build with Xcode. 2024-12-17 21:27:08 +04:00
John Preston
3f0d687656 Add cache for global media search requests. 2024-12-17 21:17:14 +04:00
John Preston
d59eb8e731 Support global media in chats search. 2024-12-17 21:17:14 +04:00
John Preston
04e9eed88d Reuse filters slider scroll for search. 2024-12-17 21:17:14 +04:00
John Preston
5072e95f16 Support folders strip touch-screen scroll. 2024-12-17 21:17:14 +04:00
John Preston
a2b8366477 Show forward original date in context menu. 2024-12-17 21:17:14 +04:00
John Preston
e9a6bee046 Fix sending old topic messages. 2024-12-17 21:13:29 +04:00
John Preston
080a8d7ee5 Fix "Open" miniapp button antialiasing. 2024-12-17 21:13:29 +04:00
John Preston
f94fd3118b Add "My Profile" instead of "My Stories". 2024-12-17 21:13:29 +04:00
John Preston
8ddb13d6e2 Show verified/premium badge in chat preview. 2024-12-17 21:13:29 +04:00
John Preston
c6cf8be8d4 Redesign gift visibility toggle. 2024-12-17 21:13:29 +04:00
John Preston
e92270a9ab Add "View Discussion" button to third column. 2024-12-17 21:13:29 +04:00
John Preston
65d6636a41 Add special toast title for anonymous stars. 2024-12-17 21:13:29 +04:00
John Preston
4701badb2a Highlight text in bottom of a long bubble. 2024-12-17 21:13:29 +04:00
John Preston
3565215c81 Highlight word from search query. 2024-12-17 21:13:29 +04:00
John Preston
3957fea5e4 Send start in bots auto in existing bot chats. 2024-12-17 21:13:29 +04:00
John Preston
10f1ae152d Fix crash in sending games from inline bots.
Regression was introduced in 2d1fb0562d.
2024-12-17 21:13:29 +04:00
John Preston
eb29b6bffe Allow forward+reply, options in single box. 2024-12-17 21:13:29 +04:00
John Preston
d157eb0b6e Enter selects from-row in reply-in-another-chat. 2024-12-17 21:13:29 +04:00
John Preston
0045eb4598 Make price categories scrollable. 2024-12-17 21:13:27 +04:00
23rd
b61c66c385 Fixed display of title widgets in separate panel while show animation. 2024-12-16 06:46:36 +03:00
23rd
56d6c4eb30 Fixed mouse track on right button for bots when there is unread badge. 2024-12-16 05:45:56 +03:00
23rd
a6030d708d Fixed display of unread state in chats filters strip after reorder. 2024-12-16 05:45:56 +03:00
23rd
683c3c4f36 Fixed Escape hotkey in info sections with search field. 2024-12-16 05:45:56 +03:00
23rd
bd084f9181 Fixed blink of submenu in profile section on section destroy. 2024-12-16 05:45:56 +03:00
23rd
fef133bf0a Fixed incorrect action type of userpic change with image from clipboard.
Fixed #28731.
2024-12-16 05:45:56 +03:00
23rd
15c226e6cf Removed confusing lock state from button in earn out section. 2024-12-16 05:45:56 +03:00
23rd
84f111d641 Fixed unreachable bottom button from contact media in some cases. 2024-12-16 05:45:55 +03:00
23rd
18c1e7ac60 Removed animation cache from dialogs widget on instant clear search. 2024-12-16 05:45:55 +03:00
Daniel Novomeský
ee6dbdced6 Update libjxl and libheif on Linux 2024-12-14 17:50:51 +04:00
Daniel Novomeský
cb443d797d Update kimageformats submodule 2024-12-14 17:50:51 +04:00
Daniel Novomeský
5a6497ec70 Upgrade libheif to 1.18.2, upgrade libjxl to 0.11.1 2024-12-14 17:50:51 +04:00
Andrey Egorov
893ca8bcbd Residence country instead of Citizenship 2024-12-06 18:29:17 +04:00
John Preston
f91e4c8b69 Version 5.9.
- Affiliate programs for bots.
- Add option to show folder tags in chats list.
2024-12-04 19:03:17 +04:00
Ilya Fedin
f7c777d07d Add branding colors to metainfo 2024-12-04 19:03:11 +04:00
John Preston
12a8e8616c Fix giveaway sticker badge. 2024-12-04 13:51:20 +04:00
John Preston
2fbf7e8504 Fix build with Xcode. 2024-12-04 13:51:20 +04:00
John Preston
6864e6d5bf Improve phrase for revoked starref link. 2024-12-04 13:51:20 +04:00
John Preston
09b4e0e21b Use nice format for numbers. 2024-12-04 13:51:20 +04:00
John Preston
f381005184 Add "New" badge for affiliate programs. 2024-12-04 13:51:20 +04:00
John Preston
42a2de4bf0 Add a NEW badge to "Earn Stars". 2024-12-04 13:51:20 +04:00
John Preston
1fd1e34844 Add link icon to connected starref programs. 2024-12-04 13:51:20 +04:00
John Preston
64dbbd7d09 Green badges for commissions. 2024-12-04 13:51:20 +04:00
John Preston
c137e577dc Allow sorting suggested starref programs. 2024-12-04 13:51:20 +04:00
John Preston
f592a9202f Improve arrow down in choose recipient box. 2024-12-04 13:51:20 +04:00
John Preston
cdc24d2e57 Fix states in joined/suggested lists. 2024-12-04 13:51:20 +04:00
John Preston
b8bf3f6520 Allow changing the recipients. 2024-12-04 13:51:20 +04:00
John Preston
82cec83d87 "Add {bot}" button in existing starrefs list. 2024-12-04 13:51:20 +04:00
John Preston
1e14667006 Add affiliate program point to bot info. 2024-12-04 13:51:20 +04:00
John Preston
6539d14852 Create/Update confirm box for the starref. 2024-12-04 13:51:20 +04:00
John Preston
400df0f980 Add referral link preview to the box. 2024-12-04 13:51:19 +04:00
John Preston
4cafb3f966 Make nicer footer in starref boxes. 2024-12-04 13:51:19 +04:00
John Preston
d8892c4eb4 Nice referral link icon in the box. 2024-12-04 13:51:19 +04:00
John Preston
1ebd25e76e Start/Update/End toasts for starref programs. 2024-12-04 13:51:19 +04:00
John Preston
ca89aa8377 Confirm box for revoke link / end program. 2024-12-04 13:51:19 +04:00
John Preston
ad6272bfe5 Show correct error on stopped starref. 2024-12-04 13:51:19 +04:00
John Preston
b401c37c39 Correctly show commission in stars stats. 2024-12-04 13:51:19 +04:00
John Preston
552dd318cd Implement nice starref start button. 2024-12-04 13:51:19 +04:00
John Preston
a97880132a Respect appconfig starref restrictions. 2024-12-04 13:51:19 +04:00
John Preston
89058c63c8 Check appconfig start ref prefixes. 2024-12-04 13:51:19 +04:00
John Preston
747e417809 Apply connected programs in realtime. 2024-12-04 13:51:19 +04:00
John Preston
fd26e1618c Add "Affiliate programs" to Manage Channel. 2024-12-04 13:51:19 +04:00
John Preston
86ea760011 Show list of programs in View Existing. 2024-12-04 13:51:19 +04:00
John Preston
824237deb3 Nice starref link box. 2024-12-04 13:51:19 +04:00
John Preston
ca8c70cc95 Fix creating default starref program. 2024-12-04 13:51:19 +04:00
John Preston
46fcc695a5 Add starref entry point to my/bot stars page. 2024-12-04 13:51:19 +04:00
John Preston
0e866a0266 Nice starref join confirmation box. 2024-12-04 13:51:19 +04:00
John Preston
63c36f5907 Implement nice limited duration slider. 2024-12-04 13:51:19 +04:00
John Preston
5299500d78 Implement nice commission slider. 2024-12-04 13:51:19 +04:00
John Preston
3b3d1aa9cc Update some icons for starref sections. 2024-12-04 13:51:19 +04:00
John Preston
62d2346471 Initial starref programs list implementation. 2024-12-04 13:51:19 +04:00
John Preston
1e15764bb9 Initial starref setup section implementation. 2024-12-04 13:51:19 +04:00
John Preston
a6bfd35f1a Add phrases for star referrals. 2024-12-04 13:51:18 +04:00
John Preston
3296efe46b Use correct format for double formatting. 2024-12-04 13:51:18 +04:00
John Preston
51ddfbc340 Update API scheme to layer 195. 2024-12-04 13:51:18 +04:00
23rd
42142d819a Added support of media with spoiler to export to JSON. 2024-12-04 11:48:07 +03:00
23rd
bbf9d523a6 Fixed incorrect calculation of title width in sponsored messages. 2024-12-04 11:48:07 +03:00
23rd
721877e10a Removed redundant special tab mode from PeerListBox. 2024-12-04 11:48:07 +03:00
23rd
a9e95a128f Fixed display of filters tabs on some cases of first activating. 2024-12-04 11:48:07 +03:00
John Preston
2b920eaa87 Use new Vazirmatn repository URL.
Co-authored-by: ilya-fedin <fedin-ilja2010@ya.ru>
2024-12-04 10:21:37 +04:00
Amir Hossein "Amiria" Maher
a3ec759e62 Update from 'vazir' to 'vazirmatn' 2024-12-04 10:21:37 +04:00
Ilya Fedin
3661442acd Add more screenshots to metainfo 2024-12-04 10:14:58 +04:00
Ilya Fedin
f232d329c5 Add transparency to the preview image 2024-12-04 10:14:18 +04:00
Ilya Fedin
ac5cf3bd80 Update summary in metainfo and comment in desktop file 2024-12-04 10:11:39 +04:00
Ilya Fedin
ac13ac7a2c Remove "Desktop" from application name on Linux 2024-12-04 10:08:04 +04:00
John Preston
0bccb35cb0 Use "Open" non-upper-case. 2024-12-03 17:26:46 +04:00
23rd
18d9484ab1 Removed Ui::show from LocalStorageBox. 2024-12-03 17:26:46 +04:00
23rd
fe7c06bc84 Added Enter shortcut to box for adding or removing of shared filter. 2024-12-03 17:26:46 +04:00
23rd
b6fb3bbf1d Fixed build of shortcuts settings included with another Session declare. 2024-12-03 17:26:46 +04:00
23rd
927d7a3aeb Renamed sessions_box to settings_active_sessions. 2024-12-03 17:26:46 +04:00
23rd
979973745b Fixed build of notifications type included with another Session declare. 2024-12-03 17:26:46 +04:00
23rd
afab863f11 Fixed non-closed last tag for inline buttons in HTML export. 2024-12-03 17:26:46 +04:00
23rd
168162c174 Fixed color of float button from sponsored message bar in new window. 2024-12-03 17:26:46 +04:00
23rd
2b122087c4 Re-fixed focus capture from compose search widget. 2024-12-03 17:26:46 +04:00
23rd
043d97cfdf Moved out SearchFieldController to td_ui. 2024-12-03 17:26:46 +04:00
GitHub Action
794818953d Update User-Agent for DNS to Chrome 131.0.0.0. 2024-12-03 17:22:11 +04:00
Ilya Fedin
783570fe9f Update Qt 6.8.0 -> 6.8.1 2024-12-03 12:15:46 +04:00
John Preston
b1e2a4243e Fix join requests list for legacy groups. 2024-11-29 20:18:31 +04:00
John Preston
b347308137 Show bot app name in title. 2024-11-29 20:18:31 +04:00
John Preston
b3c8a79946 Use langpack-ed about for Verification Codes. 2024-11-29 20:18:31 +04:00
23rd
9822c56f1a Removed display of right button for bots when there is unread badge. 2024-11-29 16:03:42 +03:00
23rd
cdd7ff5c6d Fixed count of current size for non-thumbed media with long bottom info. 2024-11-29 15:56:31 +03:00
23rd
5aba2f25cc Fixed drawing of currency icon with non-default scale in profile. 2024-11-29 15:56:31 +03:00
John Preston
96398daa78 Beta version 5.8.5: Fix build with Xcode. 2024-11-29 11:25:29 +04:00
John Preston
61ceb66415 Beta version 5.8.5.
- Fix pinned chats in folders.
- Fix emoji in folder tags.
- Fix several crashes.
2024-11-29 10:52:14 +04:00
John Preston
b4f173cdb3 Fix possible crash in ads preloading. 2024-11-29 10:33:29 +04:00
John Preston
03e4592082 Fix search in group/channel requests list. 2024-11-29 10:33:29 +04:00
John Preston
cf2dbe50a1 Fix crash in narrow column reactions view. 2024-11-29 10:33:29 +04:00
John Preston
e5bb5b75fe Fix crash in webview teardown on Windows. 2024-11-29 10:33:29 +04:00
23rd
cffce47eb1 Fixed emoji in chats filter tags. 2024-11-29 08:31:49 +03:00
23rd
ca0adba6cf Fixed pinned chats in chats filters.
Regression was introduced in e3465da979.
2024-11-28 22:08:22 +03:00
John Preston
8502b90c25 Beta version 5.8.4.
- Add option to show folder tags in chats list.
- Count group with topics as one chat in folder unread counter.
2024-11-28 21:10:45 +04:00
John Preston
cef43e7f06 Fix build with Xcode. 2024-11-28 21:10:45 +04:00
John Preston
18aaf3cc93 Fix build for MSVC. 2024-11-28 20:33:13 +04:00
John Preston
f13740cb7f Update lib_webview. 2024-11-28 20:27:35 +04:00
Daniel Novomeský
bddac79b40 Update kimageformats submodule 2024-11-28 20:26:18 +04:00
John Preston
e52baf555f Update video qualities list. 2024-11-28 20:21:26 +04:00
John Preston
475dec3014 Allow adding media to text with a link preview. 2024-11-28 20:21:26 +04:00
23rd
f2ed649694 Fixed focus capture from compose search widget. 2024-11-28 14:37:31 +03:00
23rd
e82506e0c4 Added ministars to button in service messages for premium requirements. 2024-11-28 12:28:12 +03:00
23rd
3071daa6f3 Replaced header style in statistics sections with classic subsections. 2024-11-27 15:58:54 +03:00
23rd
5d71286000 Fixed display of title in sponsored messages with shorter description. 2024-11-27 15:01:46 +03:00
23rd
339d7be9c1 Removed unused include directives from Application. 2024-11-27 14:38:06 +03:00
23rd
7f85494b1d Moved out UnreadState to td_ui. 2024-11-27 14:27:31 +03:00
23rd
a405794a03 Allowed to display of hundreds digit in unread badge of filters. 2024-11-27 12:25:18 +03:00
23rd
4e8e096fdb Removed display of corner badges in narrowed mode when entry has unread. 2024-11-27 12:22:33 +03:00
23rd
eb821c1f36 Improved display of unread badges in dialogs list with narrowed mode. 2024-11-27 11:58:34 +03:00
23rd
bf07b832f0 Replaced header in credits settings for credits history with subtitle. 2024-11-27 11:27:59 +03:00
23rd
5934614edb Fixed counting of unread topics from unread state in filters. 2024-11-27 11:27:59 +03:00
23rd
96b5c1d3d3 Added icons and color indices to dialogs menu to choose chats filters. 2024-11-27 11:27:59 +03:00
23rd
cb2972b145 Moved out fixing of ampersand from text in actions to single place. 2024-11-27 11:27:59 +03:00
23rd
cd5a1980c9 Fixed display of button for earn out when withdrawal is locked. 2024-11-27 11:27:59 +03:00
23rd
0e35107e17 Added ability to create new filter with selected dialog from menu. 2024-11-27 11:27:59 +03:00
23rd
10b026dfe0 Added ability to open peer in new window from short info box. 2024-11-27 11:27:59 +03:00
23rd
743c3c54a7 Added message counter to each peer in moderate box. 2024-11-27 11:27:59 +03:00
23rd
489c86dad8 Added ability to disable debug logs even for debug builds. 2024-11-27 11:27:59 +03:00
23rd
a9824fde91 Added right button for bots in list from recent dialogs. 2024-11-27 11:27:59 +03:00
23rd
6c62bbe6fb Added right button for bots in dialogs list in filtered mode. 2024-11-27 11:27:59 +03:00
23rd
8a3aa660cb Added initial implementation of right button for bots in dialogs list. 2024-11-27 11:27:59 +03:00
23rd
14cc7789d9 Allowed to choose filters from any profile of peers in chats list. 2024-11-27 11:27:59 +03:00
23rd
728d9a0993 Added ability to remove peer from chats filters when leave it. 2024-11-27 11:27:59 +03:00
23rd
aa8d543ed8 Fixed ability to remove peer from chats filter to make it empty. 2024-11-27 11:27:59 +03:00
23rd
b335981621 Removed duplicated search of correspond chat filter for tags in dialogs. 2024-11-27 11:27:59 +03:00
23rd
9d5ca1252a Added ability to pass preloaded chats filter tags toggle on logging in. 2024-11-27 11:27:59 +03:00
23rd
d5dbbd566f Fixed display tags with NoRead flag while history has fake unread state. 2024-11-27 11:27:59 +03:00
23rd
5362d54ab6 Fixed display of chats filter tag for active dialog rows. 2024-11-27 11:27:59 +03:00
23rd
1f162aa2a0 Fixed tags display when color of chats filter tag is toggled. 2024-11-27 11:27:59 +03:00
23rd
4a19f193ce Added float preview of color for chats filter to settings. 2024-11-27 11:27:59 +03:00
23rd
cfc40ee966 Added ability to set color for chats filter from settings. 2024-11-27 11:27:59 +03:00
23rd
6baba5a7b2 Added ability to disable chats filters tags from settings. 2024-11-27 11:27:59 +03:00
23rd
ba082081b3 Added api support for enabled tags of chats filters. 2024-11-27 11:27:59 +03:00
23rd
e314c68a56 Optimized height refresh of chats list for chat filters with rules. 2024-11-27 11:27:59 +03:00
23rd
889fcb3939 Optimized height refresh of non-main list on receiving chats filters. 2024-11-27 11:27:59 +03:00
23rd
632abd2225 Optimized height refresh of main list on receiving chats filters. 2024-11-27 11:27:59 +03:00
23rd
e3465da979 Switched order of data filter applying of changes from api. 2024-11-27 11:27:59 +03:00
23rd
f4523b2dba Added initial implementation of filter tags to dialog rows. 2024-11-27 11:27:59 +03:00
23rd
0d58b32914 Added ability to recount height of dialog rows by chats filter id. 2024-11-27 11:27:59 +03:00
23rd
aea2d34080 Added styles for dialog rows with tags. 2024-11-26 08:38:40 +03:00
23rd
d5dbde0a24 Added ability to cache filter colors in dialog entries. 2024-11-26 08:38:40 +03:00
23rd
f888008dc1 Removed counting of unread topics from unread state in filters. 2024-11-25 17:45:56 +03:00
23rd
021a5881c2 Improved display of history begin for channels with enabled auto-delete. 2024-11-23 14:10:04 +03:00
23rd
3e49b45418 Added chats filters list to each exception row in edit chats filter box. 2024-11-23 10:28:04 +03:00
23rd
23e22650f9 Added ability to choose filters for channel from its profile. 2024-11-23 10:28:04 +03:00
John Preston
85267a921e Version 5.8.3.
- Ctrl+Click on Reply in groups to reply in another chat.
- Fix freeze on forward messages box opening.
- Improve phrases in bot subscriptions.
- Several bugfixes.
2024-11-23 11:11:39 +04:00
John Preston
2c7089d47f Ctrl+Reply+Click replies in another chat. 2024-11-23 10:47:36 +04:00
John Preston
edc6cfe210 Replace non-started calls. 2024-11-23 10:04:55 +04:00
John Preston
03b6e2df17 Don't confirm each bot-url webapp open. 2024-11-23 09:37:26 +04:00
John Preston
5309138980 Support display of messageActionPaymentSentMe. 2024-11-23 09:36:09 +04:00
John Preston
a5e927ea4f Fix build for Windows. 2024-11-23 08:59:53 +04:00
23rd
ec83f4ae72 Removed unnecessary rebuild of chats filters strip when order is same. 2024-11-23 06:01:23 +03:00
23rd
71efd95136 Slightly shifted selection marks along x. 2024-11-23 05:28:36 +03:00
23rd
0c21eba1f8 Fixed display of preview for sticker packs. 2024-11-23 05:11:13 +03:00
23rd
2ae4e15f87 Fixed ability to copy transactions id from credits history entries.
Regression was introduced in 77e7796b3f.
2024-11-21 16:45:00 +04:00
23rd
d69905feae Added ability to subscribe again via slug from subscriptions list. 2024-11-21 16:45:00 +04:00
23rd
f795d56b2a Handled subscriptions list changes in settings section for credits. 2024-11-21 16:45:00 +04:00
23rd
4608ffcab4 Added weak pointer for rebuilder of subscription list to Data::Session. 2024-11-21 16:45:00 +04:00
23rd
9824df5f2a Added phrases for business subscriptions. 2024-11-21 16:45:00 +04:00
23rd
27a5ba4681 Added top close button to ReceiptCreditsBox. 2024-11-21 16:45:00 +04:00
23rd
73936dca73 Added mini stars to subscriptions with details in ReceiptCreditsBox. 2024-11-21 16:45:00 +04:00
23rd
213274e96c Replaced style of button to cancel subscription with hyper link. 2024-11-21 16:45:00 +04:00
23rd
7518361266 Improved style of ReceiptCreditsBox for subscription with detailed info. 2024-11-21 16:45:00 +04:00
23rd
f7aaece2f7 Extended width of ReceiptCreditsBox. 2024-11-21 16:45:00 +04:00
23rd
fbce06cb26 Added support of subscription status when it is cancelled by bot. 2024-11-21 16:45:00 +04:00
23rd
ccc0bf57a1 Added support of items with different heights in list of subscriptions. 2024-11-21 16:45:00 +04:00
23rd
ee29deee47 Improved display of detailed subscriptions in list of credits history. 2024-11-21 16:45:00 +04:00
23rd
17e54104a9 Added api support of subscription details. 2024-11-21 16:45:00 +04:00
23rd
479e369d29 Replaced list of credits subscriptions with peer list with widgets. 2024-11-21 16:45:00 +04:00
23rd
3042fb7299 Added initial very limited implementation of peer list with widgets. 2024-11-21 16:45:00 +04:00
23rd
36fa455aad Added third line to entries of list for credits history. 2024-11-21 16:45:00 +04:00
23rd
1c64e90537 Split creation of button for pagination in statistics lists. 2024-11-21 16:45:00 +04:00
23rd
09643aef82 Added support of credits subscriptions to send credits box. 2024-11-21 16:45:00 +04:00
23rd
03d9fb4115 Added api support of subscription period in credits invoices. 2024-11-21 16:45:00 +04:00
23rd
81bea04db0 Moved out peer bubble widget to separated file. 2024-11-21 16:45:00 +04:00
John Preston
9211e338e7 Fix tooltip render glitches on macOS. 2024-11-21 16:32:32 +04:00
John Preston
23464ac55f Don't repeat premium effect on chat reopen. 2024-11-21 13:13:06 +04:00
John Preston
af78e4ea29 Show scheduled limit error. 2024-11-21 13:10:59 +04:00
John Preston
e3d9216b10 Fix switch_inline_query with same_peer in topics.
Fixes #27290.
2024-11-21 11:41:46 +04:00
John Preston
9532a2e3da Fix emoji status set cancel.
Fixes #28674.
Fixes https://bugs.telegram.org/c/45691.
2024-11-21 10:01:31 +04:00
23rd
e70f50d837 Changed engine of chats filters in forward box with restoring state. 2024-11-20 16:37:49 +03:00
23rd
2dfa58aae2 Moved out some constant color indices to separated style file. 2024-11-20 16:37:49 +03:00
John Preston
c04f68f25c Version 5.8.2.
- Improve bottom label color in mini apps.
- Fix some fullscreen issues in mini apps.
- Fix miss-order of archived chats in forward box.
- Fix file dialog for Windows on ARM.
- Fix emoji status pack view from profile regression.
2024-11-19 14:32:15 +04:00
John Preston
e4902efefc Improve fullscreen miniapps on Linux. 2024-11-19 14:24:25 +04:00
John Preston
1267bcd255 Use separate window buttons only with QWindowContainer. 2024-11-19 13:16:54 +04:00
John Preston
0659ccc3f0 Fix user-driven fullscreen change on macOS. 2024-11-19 12:25:27 +04:00
23rd
bd2ae03ab4 Fixed display of long text for open button in web page views. 2024-11-19 10:39:40 +04:00
23rd
244696ae24 Fixed miss-order of archived dialogs in forward box. 2024-11-19 10:39:39 +04:00
John Preston
1438046dd4 Improve bottom label color in mini apps. 2024-11-19 10:37:47 +04:00
John Preston
5c62ba0835 Don't reopen forum on opening a link. 2024-11-18 16:37:22 +04:00
John Preston
20fadfef7f Fix file dialog for Windows on ARM. 2024-11-18 16:01:15 +04:00
John Preston
eed9541f9f Fix Withdraw button text. 2024-11-18 14:25:24 +04:00
John Preston
1594afa389 Fix emoji status pack view regression. 2024-11-18 14:17:01 +04:00
John Preston
9d74d93ed7 Fix some warnings from PVS-Studio.
Fixes #28667.

Some warnings fixed detailed in this post:
https://pvs-studio.com/en/blog/posts/cpp/1186/
2024-11-18 12:50:36 +04:00
John Preston
e4e2f47f8e Adjust build script for Windows Store ARM version. 2024-11-18 01:28:36 +04:00
John Preston
be53bec9b7 Version 5.8.1.
- Fix several possible crashes.
2024-11-17 23:33:45 +04:00
John Preston
bb32c546d4 Fix possible crash in swipe to reply. 2024-11-17 23:24:08 +04:00
John Preston
ecb4ceec7b Fix possible crash in phone click handler. 2024-11-17 23:21:16 +04:00
John Preston
c080bd4c4d Don't resubscribe on folder strip rebuild. 2024-11-17 23:09:42 +04:00
John Preston
39780f49bf Fix folder context menu Remove text color. 2024-11-17 23:00:46 +04:00
John Preston
73349c3c89 Fix crash in chats strip reorder. 2024-11-17 22:52:52 +04:00
John Preston
42a70ff7d0 Fix crash with inline results sending. 2024-11-17 22:41:52 +04:00
John Preston
fa8262cbe9 Version 5.8.
- Updates in Mini Apps platform.
- Chat folders in forward and share boxes.
- Horizontal strip mode for chat folders.
2024-11-17 16:05:22 +04:00
John Preston
7552328cdd Multi-select in mini app send prepared. 2024-11-17 15:08:17 +04:00
John Preston
60f4587d95 Sort birthday gifts to the front. 2024-11-17 15:08:17 +04:00
John Preston
572c074c42 Add gifts-to-profile privacy. 2024-11-17 15:08:17 +04:00
John Preston
3cfbd6a93b Support non-convertible star gifts from bots. 2024-11-17 15:08:16 +04:00
John Preston
d0911b6a45 Send to buy premium from miniapps emoji status. 2024-11-17 15:08:16 +04:00
John Preston
06b85442f8 Fix miniapp downloads in fullscreen. 2024-11-17 15:08:16 +04:00
John Preston
762592daff Allow RTMP for manage call admins. 2024-11-17 15:08:16 +04:00
John Preston
338122793c Implement bot downloads list UI. 2024-11-17 15:08:16 +04:00
John Preston
ef521624a0 Check file by server before downloading. 2024-11-17 15:08:16 +04:00
John Preston
341ab781b2 Implement download of files in miniapps. 2024-11-17 15:08:16 +04:00
John Preston
2fed657940 Make nice share message from miniapp. 2024-11-17 15:08:16 +04:00
John Preston
7bf78b3317 Use initial bot web app header/body colors. 2024-11-17 15:08:16 +04:00
John Preston
2d1fb0562d Prepared messages sharing from miniapp. 2024-11-17 15:08:16 +04:00
John Preston
3d77bff0c9 Support bot emoji status access. 2024-11-17 15:08:15 +04:00
John Preston
4198203a7f Implement emoji status set from miniapps. 2024-11-17 15:08:15 +04:00
John Preston
21487641c1 Support miniapp fullscreen API. 2024-11-17 15:08:15 +04:00
John Preston
c987872be8 Start fullscreen support in SeparatePanel. 2024-11-17 15:08:15 +04:00
John Preston
07e367e1a0 Update API scheme to layer 193. 2024-11-17 15:08:15 +04:00
23rd
db2e45c56e Added ability to go to top of chats list by clicking on selected filter. 2024-11-17 13:43:19 +03:00
23rd
67bbdbfc70 Added ability to change userpic with image from clipboard. 2024-11-17 13:27:57 +03:00
23rd
83df3cba66 Added debug logs for changing chats filters from context menu. 2024-11-17 13:27:57 +03:00
John Preston
f4e2b4bcbd Don't drop the old state of "systemDarkModeEnabled". 2024-11-17 14:07:22 +04:00
Ilya Fedin
6c64c22f83 Don't expand minimum window size for folders
Turn them into horizontal automatically instead
2024-11-17 14:04:27 +04:00
John Preston
702aa944dd Move read/reacted list to a layer. 2024-11-17 14:03:29 +04:00
John Preston
df45edd816 Move channel requests to a layer. 2024-11-17 14:03:29 +04:00
23rd
3f3143514e Added attention style to menu item to delete chats filter. 2024-11-17 11:20:02 +03:00
23rd
3e89910749 Replaced user info with short box for admins in section of kicked users. 2024-11-17 10:46:12 +03:00
23rd
721a642a2f Added date to info who promoted or restricted participants in menu. 2024-11-17 10:40:35 +03:00
23rd
d16ccc9dc5 Fixed display of chats filters strip on removing last chats filter. 2024-11-17 01:52:12 +03:00
23rd
77e7796b3f Fit transactions id from credits history entries to table cell. 2024-11-16 14:43:34 +03:00
23rd
983c949e8c Added ability to provide preloaded credits topup options to list. 2024-11-16 11:39:47 +03:00
23rd
e3f4f60e2d Replaced list of credits topup options with big label in settings. 2024-11-16 11:39:47 +03:00
23rd
33aa904cb7 Added shortcuts to flip photos in media viewer. 2024-11-16 11:39:40 +03:00
23rd
0248be5543 Removed from display extended credits topup options by default. 2024-11-16 07:34:08 +03:00
23rd
f7ca8212aa Moved out down arrow icon of "Show More" button to single place. 2024-11-16 07:34:02 +03:00
23rd
5eb59a1a43 Improved style of tabs for boost gifts in boosts section. 2024-11-16 06:27:07 +03:00
John Preston
7dd1e9bfbe Beta version 5.7.4: Revert accident submodules. 2024-11-16 00:04:20 +04:00
John Preston
067fd25a34 Beta version 5.7.4.
- Enable auto night mode by default.
- Use muted chats folder badge in horizontal strip.
- Fix custom userpic context menu in comments and topics.
- Fix scrolling of chats folders together with the list.
- Fix chats folders list disappearing in some cases.
- Fix topic groups in share box with chats folders.
- Fix bot commands list in some groups.
- Fix crash in channel short info box display.
- Fix crash in bot monetization section opening.
- Fix crash in bot sponsored messages destruction.
2024-11-15 23:59:52 +04:00
John Preston
7cb26ba104 Fix crash in possible ads teardown. 2024-11-15 23:53:59 +04:00
John Preston
a4212cc865 Fix point state detection on media messages. 2024-11-15 23:53:59 +04:00
John Preston
0445f7d6e8 Enable auto-night-mode by default. 2024-11-15 23:53:59 +04:00
John Preston
efe99b3f62 Fix special userpic menu in topics. 2024-11-15 23:53:59 +04:00
23rd
7f2c98f17a Fixed mouse events in chats filters strip with inner padding. 2024-11-15 22:47:39 +03:00
23rd
8f1d215851 Fixed rebuild of chats filters in strip when premium status is changed. 2024-11-15 22:47:39 +03:00
23rd
013b58f6f6 Fixed display of forums in share box with applied chats filter. 2024-11-15 20:04:42 +03:00
23rd
9d3b3476c2 Fixed display of chats filters strip in new windows. 2024-11-15 11:00:35 +03:00
23rd
715874a98f Slightly improved phrase for no results in forward box. 2024-11-15 11:00:30 +03:00
23rd
d2109dd2cb Replaced outer padding for chats filters strip with inner padding. 2024-11-15 11:00:26 +03:00
23rd
ddaf11ed6a Improved style of sponsored messages with media with max width. 2024-11-15 11:00:14 +03:00
23rd
2b5f68003d Fixed pagination of subscriptions in list. 2024-11-15 11:00:07 +03:00
23rd
1a759cc4e7 Fixed crash from short info box for non-users. 2024-11-15 10:59:40 +03:00
23rd
9e83562bf4 Fixed display of pinned chats from main list in forward box. 2024-11-15 10:57:08 +03:00
23rd
c03c19d26f Slightly improved style of chats lists strip in boxes. 2024-11-15 10:57:08 +03:00
23rd
ad9ebdf8e6 Fixed propagation scroll from chats filters strip to chats list. 2024-11-15 10:57:08 +03:00
23rd
9c1701c62a Added support of muted chats filters to chats filters strip. 2024-11-15 10:57:08 +03:00
23rd
edf6c42e9d Added short variant of unfiltered chats list to chats filters strip. 2024-11-15 10:57:08 +03:00
23rd
f0f2a71a87 Fixed disappearing of chats filters strip in forward box after search. 2024-11-15 10:57:08 +03:00
23rd
cf270bd9ce Removed chats filters strip from forum layout. 2024-11-15 10:57:08 +03:00
23rd
49223a4688 Fixed possible crash for bot owners in earn section for bots. 2024-11-15 10:57:08 +03:00
ziplantil
074bb1e66e Fix bug in ChatBotCommands::update when commands empty (#28631) 2024-11-14 11:35:57 +04:00
John Preston
7e2e510d8a Beta version 5.7.3: Fix build with Xcode. 2024-11-13 00:51:35 +04:00
John Preston
1ed34c6fa0 Beta version 5.7.3.
- Option to show folders above the chats list.
- Folders on top of recipients list box.
2024-11-13 00:19:58 +04:00
John Preston
78a0fa55b5 Send correct round video upload actions. 2024-11-12 22:58:05 +04:00
23rd
d37c040b36 Improved style of button for earn out when it is disabled. 2024-11-11 19:32:21 +03:00
23rd
e56bbf557d Added ability to open filters list in context menu from share boxes. 2024-11-11 10:18:00 +03:00
23rd
5abecec478 Fixed display of sponsored messages at bottom for bots. 2024-11-11 10:18:00 +03:00
23rd
ccb41f778e Removed selection marks from unselectable messages. 2024-11-11 10:18:00 +03:00
23rd
059a4cf0d8 Fixed ripple animation for sponsored messages.
Regression was introduced in 3f6d184435.
2024-11-11 10:18:00 +03:00
23rd
7a535a4554 Fixed display of sponsored messages with long descriptions and media. 2024-11-11 10:18:00 +03:00
23rd
f89167ef94 Fixed display of chats filters strip from dialogs widget in search mode. 2024-11-11 10:18:00 +03:00
23rd
a77777f509 Fixed display of chats filters strip from share box in search mode. 2024-11-11 10:18:00 +03:00
23rd
4a327ba584 Fixed display of chats filters strip from forward box in search mode. 2024-11-11 10:18:00 +03:00
23rd
a41e9bf67e Added preview of chats filters strip to filter link box. 2024-11-11 10:18:00 +03:00
23rd
6716973ce0 Added ability to reorder tabs of chats filters strip. 2024-11-11 10:18:00 +03:00
23rd
7cc81393d6 Adapted chats filters tabs slider for reorder feature. 2024-11-11 10:18:00 +03:00
23rd
3e413a036f Added initial implementation of class for reorder of tabs slider. 2024-11-11 10:18:00 +03:00
23rd
63a8fe7ee8 Added direct access to sections of discrete slider to derived classes. 2024-11-11 10:18:00 +03:00
23rd
146409844d Simplified geometry management of chats filters strip. 2024-11-11 10:18:00 +03:00
23rd
ba0da9f59e Slightly improved process of switching between chats filters view types. 2024-11-11 10:18:00 +03:00
23rd
81aef519d4 Added support of setting for chats filters view type to filters menu. 2024-11-11 10:18:00 +03:00
23rd
bcd84518d1 Added tracking of active chats filter to chats filters strip. 2024-11-11 10:18:00 +03:00
23rd
f205952ff2 Added chats filters strip to dialogs widget. 2024-11-11 10:18:00 +03:00
23rd
1d7622e0b5 Added condition to hide chats filters strip. 2024-11-11 10:18:00 +03:00
23rd
4d9112283d Added support of locked sections to chats filters tabs slider. 2024-11-11 10:18:00 +03:00
23rd
dc49c788a8 Added setting for chat filters view type to filters settings. 2024-11-11 10:18:00 +03:00
23rd
36741ab780 Reused setting for legacy iv zoom for chat filters view type. 2024-11-11 10:18:00 +03:00
23rd
53dffc5e88 Added context menu to chats filters strip. 2024-11-11 10:18:00 +03:00
23rd
607c7e7777 Added context menu process to chats filters tabs slider. 2024-11-11 10:18:00 +03:00
23rd
6f09e1699f Moved out display of remove filter box from chats filters menu. 2024-11-11 10:18:00 +03:00
23rd
8c35de48f3 Added process of unread states to chats filters strip. 2024-11-11 10:18:00 +03:00
23rd
b83d943841 Moved out value notification settings for filters to separated file. 2024-11-11 10:18:00 +03:00
23rd
b11b5caeb3 Moved out unread state values of main list to separated file. 2024-11-11 10:18:00 +03:00
23rd
36924da59a Replaced inner slider in chats filters strip. 2024-11-11 10:18:00 +03:00
23rd
f0a2c47613 Added initial implementation of chats filters tabs slider to td_ui. 2024-11-11 10:18:00 +03:00
23rd
5a4449f1a2 Added ability to set custom width of section to DiscreteSlider. 2024-11-11 10:18:00 +03:00
23rd
de3d7a7774 Removed redundant templates from DiscreteSlider. 2024-11-11 10:18:00 +03:00
23rd
b06dbd1c00 Added support of pinned chats from filters to forward box. 2024-11-11 10:18:00 +03:00
23rd
1fa5e424e9 Added chats filters tabs strip to share box. 2024-11-11 10:18:00 +03:00
23rd
d81c7abf1a Added chats filters strip to forward box. 2024-11-11 10:18:00 +03:00
23rd
932215c91d Added initial implementation of tabs strip for chats filters. 2024-11-11 10:18:00 +03:00
23rd
7aa1141ba5 Added ability to ignore hidden rows while searching to PeerListContent. 2024-11-11 10:18:00 +03:00
23rd
3699439506 Added ability to count sections widths of slider from derived class. 2024-11-11 10:18:00 +03:00
23rd
76b1288f77 Added access to height of multi select from peer list box. 2024-11-11 10:18:00 +03:00
xmdn
8fd9ae4e59 Replace deprecated x64 architecture identifier 2024-11-11 11:16:08 +04:00
John Preston
53abd2fe38 Follow show-panel-on-click for attach menu. 2024-11-06 17:53:09 +04:00
xiota
da8a4ba8ab Fix some ffmpeg 7.x related errors 2024-11-06 16:42:18 +04:00
John Preston
9c3990c0c1 Fix deploy scripts for Windows on ARM. 2024-11-06 16:41:56 +04:00
John Preston
1eeb46d5fc Fix build on VS 17.12 Preview 4 on ARM. 2024-11-06 12:26:12 +04:00
John Preston
02c01e258c Version 5.7.2.
- Fix recompressed video playback cutoff.
- Fix video message recroding on macOS.
2024-11-05 12:45:43 +04:00
John Preston
b2f912868d Fix record availability check on macOS. 2024-11-05 11:38:04 +04:00
John Preston
ecf0eba0a5 Open forum with topic by topic message link. 2024-11-05 11:37:15 +04:00
John Preston
8e5fec2fa8 Open forum from common groups. 2024-11-05 11:37:00 +04:00
John Preston
89c35e8512 Show copy-to-clipboard button tooltip. 2024-11-05 11:36:10 +04:00
John Preston
3fa88fad79 Correctly highlight label links in RTL. 2024-11-05 11:32:59 +04:00
John Preston
5f037462ed Implement a special context menu for sender userpic. 2024-11-04 16:54:01 +04:00
John Preston
93c01e5f1e Show "Hide My View" only for user stories. 2024-11-04 16:53:37 +04:00
John Preston
52953626a7 Allow ctrl/cmd+click copy private post link. 2024-11-04 15:22:13 +04:00
John Preston
f77fdc799d Show special phone number context number. 2024-11-04 14:52:58 +04:00
John Preston
7bf1f9bd71 Put manage chat above stories archive. 2024-11-04 14:41:25 +04:00
John Preston
363ffc1c04 Remove unused null option in SendReport(). 2024-11-04 14:05:37 +04:00
John Preston
4001899bdf Add personal channel to ShortInfoBox. 2024-11-04 14:00:51 +04:00
John Preston
fabdd89c4a Use original duration for video qualities. 2024-11-04 13:11:10 +04:00
John Preston
70f1675085 Improve diff/patch/git highlighting. 2024-11-04 12:18:00 +04:00
John Preston
07e1e2d9d6 Allow opening username in specific indexed account. 2024-11-04 12:03:37 +04:00
John Preston
ebff6c6370 Show exact reactions count in channels. 2024-11-04 11:20:29 +04:00
John Preston
233eb6d916 Version 5.7.1.
- Fix occasional redundant newlines before message timestamp.
- Remove playback speed change on settings button click.
- Fix video playback settings button on hidpi screens.
- Fix return from Picture-in-Picture to media viewer.
- Fix video quality auto-switching in Picture-in-Picture.
- Add message link to channel stars transaction information.
- Fix GIF playback in media viewer.
- Fix several possible crashes.
2024-11-01 22:25:07 +04:00
John Preston
d568cab2fc Fix initial IV zoom level.
Fixes #28600.
2024-11-01 22:25:07 +04:00
John Preston
8447b95c50 Fix GIF playback in media viewer. 2024-11-01 20:00:04 +04:00
John Preston
e959d1e1b0 Improve playback speed toggle logic. 2024-11-01 18:25:40 +04:00
John Preston
ead5dbe368 Strict validity check for local lastseen. 2024-11-01 18:22:57 +04:00
John Preston
f091f2b344 Fix album sending with video processing. 2024-11-01 17:52:05 +04:00
John Preston
267a51e800 Fix possible crash in scheduled sent toast. 2024-11-01 17:27:06 +04:00
John Preston
939f6095ba Fix possible crash in Recent Actions. 2024-11-01 17:18:59 +04:00
John Preston
a333615e53 Add message link to channel star transaction info. 2024-11-01 16:43:36 +04:00
John Preston
e1b33fbc40 Remove unneeded separator from context menu. 2024-11-01 14:35:33 +04:00
John Preston
99c5d994b5 Add special string for bot revenue. 2024-11-01 14:16:43 +04:00
John Preston
0971485367 Support quality change in PiP. 2024-11-01 14:15:28 +04:00
23rd
3cfa963f69 Added start date to subscription entry in credits transactions history. 2024-11-01 11:26:40 +03:00
John Preston
7096a4231f Fix PiP -> viewer streaming jump. 2024-11-01 11:26:03 +04:00
John Preston
07f0c182e6 Don't change speed on settings click. 2024-11-01 10:16:09 +04:00
John Preston
535b223333 Fix video playback settings button dpr. 2024-11-01 10:10:16 +04:00
John Preston
ffa8c2be79 Fix some of newlines before skip blocks. 2024-11-01 09:56:20 +04:00
John Preston
2873e64ca2 Update cmake_helpers. 2024-11-01 09:00:59 +04:00
Ilya Fedin
8bd28bce69 Update GSL to 4.1.0 2024-11-01 08:59:44 +04:00
Ilya Fedin
b97ce43fca Revert "Use GSL from a desktop-app fork."
This reverts commit bbe4312017.
2024-11-01 08:59:44 +04:00
GitHub Action
d34c4cc2f2 Update User-Agent for DNS to Chrome 130.0.0.0. 2024-11-01 08:39:37 +04:00
John Preston
1ca1f0fa7d Revert "Always rely on __has_include(<winres.h>)"
This reverts commit e0e4a7bec6.

Didn't work for me, gave errors when building.
2024-10-31 23:19:19 +04:00
John Preston
8c3c8f888d Version 5.7: Fix build with Xcode. 2024-10-31 21:35:51 +04:00
John Preston
a75d7f0381 Version 5.7.
- Sending video messages.
- New video quality selection in channels.
- Adding media to sent text messages via Edit.
- Ads in bots with revenue sharing with bot developers.
- Chat-specific hashtags.
2024-10-31 21:02:22 +04:00
John Preston
7684466acf Fix crash in quality auto-toggle. 2024-10-31 20:33:16 +04:00
John Preston
0067245739 Send more viewport_changed, just in case. 2024-10-31 20:33:15 +04:00
John Preston
4a5d8aa217 Fix build with MSVC. 2024-10-31 20:33:15 +04:00
John Preston
2d786aa02c Fix a typo in phrases. 2024-10-31 20:33:15 +04:00
Ilya Fedin
b0933b96ef Add error message for webview unsupported display server 2024-10-31 19:22:37 +04:00
Ilya Fedin
20fb73b626 Add error message for webview without OpenGL 2024-10-31 19:22:37 +04:00
Ilya Fedin
ae7bd7112b Stop recommending webkitgtk-6.0 2024-10-31 19:22:37 +04:00
Ilya Fedin
2365363dcc webkitgtk-6.0 -> webkit2gtk-4.1 in snap 2024-10-31 19:22:37 +04:00
Ilya Fedin
e0e4a7bec6 Always rely on __has_include(<winres.h>) 2024-10-31 19:22:37 +04:00
Ilya Fedin
ebd0c3696a Remove #ifndef __MINGW32__ from Windows notifications
It uses C++/WinRT nowadays just like all other code so there's no point in #ifndef'ing only it
2024-10-31 19:22:37 +04:00
Ilya Fedin
e0a0d9c039 Remove outdated ifdef
The file doesn't have __in anymore
2024-10-31 19:22:37 +04:00
Ilya Fedin
dae9f2ab2b Replace CMAKE_CXX_COMPILER_FRONTEND_VARIANT check with MSVC variable 2024-10-31 19:22:37 +04:00
Ilya Fedin
7168a00ee4 Update submodules 2024-10-31 19:22:37 +04:00
John Preston
1e2d0ced20 Update submodules. 2024-10-31 19:22:23 +04:00
John Preston
d6ac883efa Implement adaptive quality selection. 2024-10-31 18:04:17 +04:00
John Preston
a386d70ae4 Track qualities availability correctly. 2024-10-31 18:04:17 +04:00
John Preston
bc8bf672b4 Don't use shared video cover in viewer. 2024-10-31 18:04:17 +04:00
John Preston
e38998214f Disable reschedule/edit-media for processing. 2024-10-31 18:04:17 +04:00
John Preston
472a2fe802 Position ttl button correctly on record finish. 2024-10-31 18:04:17 +04:00
John Preston
2d6d89b1cf Fix recording single-listen tooltip text. 2024-10-31 18:04:17 +04:00
John Preston
66be2ac6ca Show toast/tooltip info on video processing. 2024-10-31 18:04:17 +04:00
John Preston
3137c9f3f7 Jump-to-scheduled on video processing. 2024-10-31 18:04:17 +04:00
John Preston
b9ebb02e72 Update API scheme on layer 192. 2024-10-31 18:04:17 +04:00
John Preston
1e02c475d6 Show speed / quality badges. 2024-10-31 18:04:16 +04:00
John Preston
4d2cda0692 Fix menu in case speed isn't controlled. 2024-10-31 18:04:16 +04:00
John Preston
cbd2b8f428 Query recording availability in the background.
Fixes #28576.
2024-10-31 18:04:16 +04:00
John Preston
93605db690 Use custom toast for video-not-available state. 2024-10-31 18:04:16 +04:00
John Preston
2567096de0 Send correct action on round recording. 2024-10-31 18:04:16 +04:00
John Preston
6ed25d012f Use new settings icon in the player. 2024-10-31 18:04:16 +04:00
John Preston
c2afef2bde Improve changing of video playback quality. 2024-10-31 18:04:16 +04:00
John Preston
0991e7d8a4 Mirror recorded round message. 2024-10-31 18:04:16 +04:00
John Preston
cf52f2a743 Improve multi-line menu item items. 2024-10-31 18:04:16 +04:00
John Preston
37dddda1a0 Save preferred video quality to settings. 2024-10-31 18:04:16 +04:00
John Preston
3f2f3ebd51 Allow switching video quality. 2024-10-31 18:04:16 +04:00
John Preston
7ba78540ac Keep alternative video qualities list. 2024-10-31 18:04:16 +04:00
23rd
19afb49fce Fixed display of empty context menu in section of history widget. 2024-10-31 16:25:41 +03:00
23rd
46ab553fa5 Rounded earn values from overview to two decimal digits. 2024-10-31 16:12:31 +03:00
23rd
68cc42047e Unified context menu creation for different types of sponsored messages. 2024-10-30 11:59:11 +03:00
23rd
e25cf27ba5 Replaced dropdown menu with popup in box for revenue sponsored messages. 2024-10-30 11:58:33 +03:00
23rd
3895e6d958 Fixed empty context menu from space of sponsored messages. 2024-10-30 11:58:33 +03:00
23rd
24cf3984c8 Implemented operator<< for FullMsgId to enable qDebug output. 2024-10-30 06:47:13 +03:00
23rd
6237675744 Moved out ui callbacks of bar from data class from sponsored messages. 2024-10-30 06:47:13 +03:00
23rd
30dae049ff Fixed non-animated display of top bar for sponsored messages. 2024-10-30 06:39:33 +03:00
23rd
1dc30caee9 Added hide button to bar for sponsored messages without photo. 2024-10-29 15:07:28 +03:00
23rd
b2d340cbfb Added top button to box about sponsored messages for bots. 2024-10-29 15:07:28 +03:00
23rd
7d52787e54 Added support of sponsored messages with revenue to bar. 2024-10-29 14:55:14 +03:00
23rd
ae3f16ccbd Changed behavior to show earlier button in dialog list to jump to top. 2024-10-28 19:34:27 +03:00
23rd
057222757b Added decimal separators to count of credits in balances of owned bot. 2024-10-28 17:47:17 +03:00
23rd
119f109904 Added api support of paid credits transactions from bots. 2024-10-28 17:47:17 +03:00
23rd
23a77b1ba4 Fixed width of menu item for IV zoom. 2024-10-28 15:55:28 +03:00
23rd
c076daa91f Added ability to implement platform-dependent zoom controller for IV. 2024-10-28 15:55:28 +03:00
23rd
b7ef5325ac Improved display of sponsored message bar for preloaded messages. 2024-10-28 13:26:10 +03:00
23rd
8b535c58fa Slightly improved sponsored message bar for instant display. 2024-10-28 13:25:27 +03:00
23rd
6bc8daaeda Added earn button to section of bot settings. 2024-10-27 14:17:51 +03:00
23rd
7a2562e5bb Added icons to earn buttons in profile sections of owned bots. 2024-10-27 13:42:17 +03:00
23rd
9e0c731b32 Moved out generation of credits menu icon from svg to td_ui. 2024-10-27 13:42:01 +03:00
23rd
2e0e4006a1 Moved out generation of currency icon from svg to td_ui. 2024-10-27 13:41:14 +03:00
23rd
187139473d Added subsection title to earn buttons in profile of owned bots. 2024-10-27 13:40:37 +03:00
23rd
dbb0a5ad28 Added ability to open currency earn section for owned bots. 2024-10-27 10:04:06 +03:00
23rd
24aaed44b9 Slightly simplified constructor of Info::BotEarn::InnerWidget. 2024-10-27 09:56:41 +03:00
23rd
32b8d83c04 Moved out Info::Statistics::Tag to separated file. 2024-10-27 09:56:41 +03:00
23rd
bf55c325ce Fixed hotkey to reset IV zoom. 2024-10-27 05:01:25 +03:00
23rd
3af288c74e Added currency balance to profile section of owned bots. 2024-10-26 19:20:56 +03:00
23rd
e306d9ba35 Added loading of balances on receiving full user for owned bots. 2024-10-26 19:20:50 +03:00
23rd
b23a877d7e Added ability to cache currency balance by peer. 2024-10-26 19:20:50 +03:00
23rd
08fda055fc Renamed Api::ChannelEarnStatistics with Api::EarnStatistics. 2024-10-26 19:20:50 +03:00
23rd
84055ed74e Added context menu to top bar of sponsored messages. 2024-10-26 17:55:07 +03:00
23rd
2db30690ce Added ability to open menu for sponsored messages without history item. 2024-10-26 17:55:07 +03:00
23rd
304bcfd343 Added initial button to top bar of sponsored messages to hide it. 2024-10-26 17:55:07 +03:00
23rd
8a1cf2bb3a Added initial implementation of top bar for sponsored messages. 2024-10-26 17:55:07 +03:00
23rd
c857c24a64 Added util functions to process photo and document as dynamic images. 2024-10-26 17:55:07 +03:00
23rd
bbdcb047d0 Added ability to request sponsored messages not only for channels. 2024-10-26 17:55:07 +03:00
John Preston
78f2e70956 Update API scheme to layer 192. 2024-10-26 16:36:17 +04:00
John Preston
75a75626ce Show info about popular apps section. 2024-10-26 16:34:44 +04:00
John Preston
cec9688d58 Implement public posts hashtag search preview. 2024-10-26 16:34:44 +04:00
John Preston
81492b7d3a Add "when edited" context menu information. 2024-10-26 16:34:43 +04:00
John Preston
9166acbbb9 Improve gift convert confirmation. 2024-10-26 16:34:43 +04:00
John Preston
36de2b6ca6 Improved received star gift box. 2024-10-26 16:34:43 +04:00
John Preston
21f909dd4b Improve star gift value table row. 2024-10-26 16:34:43 +04:00
John Preston
f2a92c9122 Update API scheme to layer 191. Sold out gifts. 2024-10-26 16:34:43 +04:00
John Preston
7ee2e3d8bc Support hashtags with mentions. 2024-10-25 18:14:44 +04:00
John Preston
f89aeb6ad4 Implement text -> media message editing. 2024-10-25 18:14:44 +04:00
John Preston
0397006894 Add more logging on failed top peers reading. 2024-10-25 18:14:44 +04:00
23rd
d6863074b2 Fixed error handler of wrong cloud password for withdrawal button. 2024-10-24 19:46:35 +03:00
23rd
9c185a30e0 Slightly improved position of button for QR of username. 2024-10-24 19:15:19 +03:00
23rd
a8f492a027 Improved colors of ministars in buttons from section of peer gifts. 2024-10-24 18:34:11 +03:00
23rd
0a92b1dc68 Slightly improved subtext in overview from statistics section. 2024-10-24 18:15:33 +03:00
23rd
e6d661f8ee Fixed statistics section of stories from megagroups. 2024-10-24 17:43:04 +03:00
23rd
f48dfb5d81 Added ability to add to contacts phone from text phone entity. 2024-10-24 17:04:22 +03:00
23rd
cd041e8366 Replaced empty settings button with simple ripple button. 2024-10-24 17:04:22 +03:00
23rd
6787ea883e Replaced empty icon buttons with simple circle ripple buttons. 2024-10-24 17:04:22 +03:00
John Preston
78937d716f Beta version 5.6.4.
- Add recording of video messages in case a camera is available.
- Add "Respect the Focus settings" for custom notifications on Windows.
2024-10-24 13:40:52 +04:00
John Preston
9713abc002 Fix build with GCC. 2024-10-24 13:36:22 +04:00
John Preston
b44b45cca0 Fix docker build with openh264 in ffmpeg. 2024-10-24 13:26:46 +04:00
John Preston
9e2cf0ed73 Nice faded show/hide of round recorder. 2024-10-24 13:26:46 +04:00
John Preston
b01d7ea5b9 Show recording init errors. 2024-10-24 13:26:46 +04:00
John Preston
ae89b65a98 Fix message selection checks position. 2024-10-24 13:26:46 +04:00
John Preston
9b9c3d788d Skip some first frames. 2024-10-24 13:26:46 +04:00
John Preston
ccc6c6daa5 Save last camera image as a placeholder. 2024-10-24 13:26:46 +04:00
John Preston
9ce6636c6a Create nice camera init effect. 2024-10-24 13:26:46 +04:00
John Preston
6287d306c2 Add better discard confirmations. 2024-10-24 13:26:46 +04:00
John Preston
6cfa053328 Add recorded round video preview. 2024-10-24 13:26:45 +04:00
John Preston
9514b6eecd Show mini-thumbnails when pausing recording. 2024-10-24 13:26:45 +04:00
John Preston
c8d4818d22 Blurred frame while paused. 2024-10-24 13:26:45 +04:00
John Preston
4142ada729 Concatenate two recordings. 2024-10-24 13:26:45 +04:00
John Preston
d7ffdbd78d Prepare for round record pause/resume. 2024-10-24 13:26:45 +04:00
John Preston
e8d87d37bb Use a shorter phrase for bot policy. 2024-10-24 13:26:45 +04:00
John Preston
343ffc23eb Add some dir="auto" to IV page.
I hope this fixes #28551.
2024-10-24 13:26:45 +04:00
John Preston
95e0086eed Remov unused variable. 2024-10-24 13:26:45 +04:00
John Preston
c010ecfe38 Allow sending one-time round videos. 2024-10-24 13:26:45 +04:00
John Preston
302e9371c8 Show record init errors. 2024-10-24 13:26:45 +04:00
John Preston
7060c0e6d7 Fix crash in context menu without an item.
Fixes #28552.
2024-10-24 13:26:42 +04:00
John Preston
20a4c7f9f4 Wait for both audio and video to start. 2024-10-24 13:24:44 +04:00
John Preston
e59e4afd3e Show recording progress. 2024-10-24 13:24:44 +04:00
John Preston
f74dd3ca1e Add author to the top of Reply in Another Chat. 2024-10-24 13:24:44 +04:00
John Preston
511cfc524f Adjust bitrates for video messages. 2024-10-24 13:24:44 +04:00
John Preston
4cf6173d25 Cut video messages round with white bg. 2024-10-24 13:24:44 +04:00
John Preston
17996757fd Show round video preview. 2024-10-24 13:24:44 +04:00
John Preston
6bc1049858 Use nice icon for video message recording. 2024-10-24 13:24:43 +04:00
John Preston
ff44f626ba Allow switching between voice/video. 2024-10-24 13:24:43 +04:00
John Preston
552343fa37 PoC video messages sending. 2024-10-24 13:24:43 +04:00
John Preston
4dc7fd8cd1 Add AAC/H264 encoders, MP4 muxer. 2024-10-24 13:24:43 +04:00
John Preston
285c96fd2e Add "Respect the Focus settings" on Windows. 2024-10-24 13:24:43 +04:00
John Preston
e6af33367e Accept bot username in chatbot setup. 2024-10-24 13:24:43 +04:00
23rd
7092fe2242 Added default ripple animation style with windowBgOver color. 2024-10-24 09:05:27 +04:00
23rd
a32ff46579 Added special hotkeys to change IV zoom more gradually. 2024-10-24 09:05:27 +04:00
23rd
7f20cf59d1 Added ministars to button in service messages for gifts. 2024-10-24 09:05:27 +04:00
23rd
a8a1b08127 Added ministars to buttons in section of peer gifts. 2024-10-24 09:05:27 +04:00
23rd
1a1e777b87 Fixed display of generic media with small width. 2024-10-24 09:05:27 +04:00
23rd
9e76e64064 Improved parts alignments of round video messages. 2024-10-24 09:05:27 +04:00
23rd
975ae17ef9 Moved selection marks to bottom of message bubbles. 2024-10-24 09:05:27 +04:00
23rd
ed9dcef66f Fixed display of selection marks for messages with huge code blocks. 2024-10-24 09:05:27 +04:00
23rd
b1e537e54e Added subscription icon to channel photo in ReceiptCreditsBox. 2024-10-24 09:05:27 +04:00
23rd
e5886862c3 Changed behavior to copy phone number from profile sections as trimmed. 2024-10-24 09:05:27 +04:00
Ilya Fedin
d85b668d4f Fix lambda execution for portal dark mode getter 2024-10-24 07:04:52 +02:00
Grigory
b363d8bfb5 fix(ui/webview_helpers): append 0 if color channel value is 1 char long 2024-10-19 18:43:11 +02:00
683 changed files with 36940 additions and 7319 deletions

View File

@@ -69,7 +69,7 @@ jobs:
run: |
brew update
brew upgrade || true
brew install ada-url autoconf automake boost cmake ffmpeg@6 libtool openal-soft openh264 openssl opus ninja pkg-config python qt yasm xz
brew install ada-url autoconf automake boost cmake ffmpeg libtool openal-soft openh264 openssl opus ninja pkg-config python qt yasm xz
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
xcodebuild -version > CACHE_KEY.txt

View File

@@ -57,14 +57,14 @@ jobs:
sudo iptables -P FORWARD ACCEPT
sudo snap install --classic snapcraft
sudo usermod -aG lxd $USER
sudo snap run lxd init --auto
sudo snap run lxd waitready
sudo lxd init --auto
sudo lxd waitready
- name: Free up some disk space.
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be
- name: Telegram Desktop snap build.
run: sg lxd -c 'snap run snapcraft --verbosity=debug'
run: sudo -u $USER snap run snapcraft --verbosity=debug
- name: Move artifact.
if: env.UPLOAD_ARTIFACT == 'true'

2
.gitmodules vendored
View File

@@ -3,7 +3,7 @@
url = https://github.com/telegramdesktop/libtgvoip
[submodule "Telegram/ThirdParty/GSL"]
path = Telegram/ThirdParty/GSL
url = https://github.com/desktop-app/GSL.git
url = https://github.com/Microsoft/GSL.git
[submodule "Telegram/ThirdParty/xxHash"]
path = Telegram/ThirdParty/xxHash
url = https://github.com/Cyan4973/xxHash.git

2
LEGAL
View File

@@ -1,7 +1,7 @@
This file is part of Telegram Desktop,
the official desktop application for the Telegram messaging service.
Copyright (c) 2014-2024 The Telegram Desktop Authors.
Copyright (c) 2014-2025 The Telegram Desktop Authors.
Telegram Desktop is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@@ -58,7 +58,7 @@ Version **1.8.15** was the last that supports older systems
* Guideline Support Library ([MIT License](https://github.com/Microsoft/GSL/blob/master/LICENSE))
* Range-v3 ([Boost License](https://github.com/ericniebler/range-v3/blob/master/LICENSE.txt))
* Open Sans font ([Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0.html))
* Vazir font ([SIL Open Font License 1.1](https://github.com/rastikerdar/vazir-font/blob/master/OFL.txt))
* Vazirmatn font ([SIL Open Font License 1.1](https://github.com/rastikerdar/vazirmatn/blob/master/OFL.txt))
* Emoji alpha codes ([MIT License](https://github.com/emojione/emojione/blob/master/extras/alpha-codes/LICENSE.md))
* xxHash ([BSD License](https://github.com/Cyan4973/xxHash/blob/dev/LICENSE))
* QR Code generator ([MIT License](https://github.com/nayuki/QR-Code-generator#license))

View File

@@ -112,6 +112,8 @@ PRIVATE
api/api_bot.h
api/api_chat_filters.cpp
api/api_chat_filters.h
api/api_chat_filters_remove_manager.cpp
api/api_chat_filters_remove_manager.h
api/api_chat_invite.cpp
api/api_chat_invite.h
api/api_chat_links.cpp
@@ -244,6 +246,8 @@ PRIVATE
boxes/peers/prepare_short_info_box.h
boxes/peers/replace_boost_box.cpp
boxes/peers/replace_boost_box.h
boxes/peers/verify_peers_box.cpp
boxes/peers/verify_peers_box.h
boxes/about_box.cpp
boxes/about_box.h
boxes/about_sponsored_box.cpp
@@ -292,6 +296,8 @@ PRIVATE
boxes/peer_list_box.h
boxes/peer_list_controllers.cpp
boxes/peer_list_controllers.h
boxes/peer_list_widgets.cpp
boxes/peer_list_widgets.h
boxes/peer_lists_box.cpp
boxes/peer_lists_box.h
boxes/passcode_box.cpp
@@ -318,8 +324,6 @@ PRIVATE
boxes/send_gif_with_caption_box.h
boxes/send_files_box.cpp
boxes/send_files_box.h
boxes/sessions_box.cpp
boxes/sessions_box.h
boxes/share_box.cpp
boxes/share_box.h
boxes/star_gift_box.cpp
@@ -328,6 +332,8 @@ PRIVATE
boxes/sticker_set_box.h
boxes/stickers_box.cpp
boxes/stickers_box.h
boxes/transfer_gift_box.cpp
boxes/transfer_gift_box.h
boxes/translate_box.cpp
boxes/translate_box.h
boxes/url_auth_box.cpp
@@ -466,6 +472,7 @@ PRIVATE
core/sandbox.h
core/shortcuts.cpp
core/shortcuts.h
core/stars_amount.h
core/ui_integration.cpp
core/ui_integration.h
core/update_checker.cpp
@@ -623,6 +630,7 @@ PRIVATE
data/data_shared_media.h
data/data_sparse_ids.cpp
data/data_sparse_ids.h
data/data_star_gift.h
data/data_statistics.h
data/data_stories.cpp
data/data_stories.h
@@ -636,6 +644,8 @@ PRIVATE
data/data_thread.h
data/data_types.cpp
data/data_types.h
data/data_unread_value.cpp
data/data_unread_value.h
data/data_user.cpp
data/data_user.h
data/data_user_photos.cpp
@@ -791,6 +801,8 @@ PRIVATE
history/view/media/history_view_story_mention.h
history/view/media/history_view_theme_document.cpp
history/view/media/history_view_theme_document.h
history/view/media/history_view_unique_gift.cpp
history/view/media/history_view_unique_gift.h
history/view/media/history_view_userpic_suggestion.cpp
history/view/media/history_view_userpic_suggestion.h
history/view/media/history_view_web_page.cpp
@@ -913,6 +925,12 @@ PRIVATE
info/bot/earn/info_bot_earn_list.h
info/bot/earn/info_bot_earn_widget.cpp
info/bot/earn/info_bot_earn_widget.h
info/bot/starref/info_bot_starref_common.cpp
info/bot/starref/info_bot_starref_common.h
info/bot/starref/info_bot_starref_join_widget.cpp
info/bot/starref/info_bot_starref_join_widget.h
info/bot/starref/info_bot_starref_setup_widget.cpp
info/bot/starref/info_bot_starref_setup_widget.h
info/channel_statistics/boosts/create_giveaway_box.cpp
info/channel_statistics/boosts/create_giveaway_box.h
info/channel_statistics/boosts/giveaway/giveaway_list_controllers.cpp
@@ -935,6 +953,12 @@ PRIVATE
info/downloads/info_downloads_provider.h
info/downloads/info_downloads_widget.cpp
info/downloads/info_downloads_widget.h
info/global_media/info_global_media_widget.cpp
info/global_media/info_global_media_widget.h
info/global_media/info_global_media_inner_widget.cpp
info/global_media/info_global_media_inner_widget.h
info/global_media/info_global_media_provider.cpp
info/global_media/info_global_media_provider.h
info/media/info_media_buttons.h
info/media/info_media_common.cpp
info/media/info_media_common.h
@@ -982,6 +1006,10 @@ PRIVATE
info/profile/info_profile_values.h
info/profile/info_profile_widget.cpp
info/profile/info_profile_widget.h
info/reactions_list/info_reactions_list_widget.cpp
info/reactions_list/info_reactions_list_widget.h
info/requests_list/info_requests_list_widget.cpp
info/requests_list/info_requests_list_widget.h
info/saved/info_saved_sublists_widget.cpp
info/saved/info_saved_sublists_widget.h
info/settings/info_settings_widget.cpp
@@ -995,6 +1023,7 @@ PRIVATE
info/statistics/info_statistics_list_controllers.h
info/statistics/info_statistics_recent_message.cpp
info/statistics/info_statistics_recent_message.h
info/statistics/info_statistics_tag.h
info/statistics/info_statistics_widget.cpp
info/statistics/info_statistics_widget.h
info/stories/info_stories_inner_widget.cpp
@@ -1031,6 +1060,10 @@ PRIVATE
info/info_wrap_widget.h
inline_bots/bot_attach_web_view.cpp
inline_bots/bot_attach_web_view.h
inline_bots/inline_bot_confirm_prepared.cpp
inline_bots/inline_bot_confirm_prepared.h
inline_bots/inline_bot_downloads.cpp
inline_bots/inline_bot_downloads.h
inline_bots/inline_bot_layout_internal.cpp
inline_bots/inline_bot_layout_internal.h
inline_bots/inline_bot_layout_item.cpp
@@ -1162,6 +1195,8 @@ PRIVATE
media/streaming/media_streaming_player.h
media/streaming/media_streaming_reader.cpp
media/streaming/media_streaming_reader.h
media/streaming/media_streaming_round_preview.cpp
media/streaming/media_streaming_round_preview.h
media/streaming/media_streaming_utility.cpp
media/streaming/media_streaming_utility.h
media/streaming/media_streaming_video_track.cpp
@@ -1374,8 +1409,6 @@ PRIVATE
settings/business/settings_recipients_helper.h
settings/business/settings_working_hours.cpp
settings/business/settings_working_hours.h
settings/cloud_password/settings_cloud_password_common.cpp
settings/cloud_password/settings_cloud_password_common.h
settings/cloud_password/settings_cloud_password_email.cpp
settings/cloud_password/settings_cloud_password_email.h
settings/cloud_password/settings_cloud_password_email_confirm.cpp
@@ -1388,6 +1421,10 @@ PRIVATE
settings/cloud_password/settings_cloud_password_manage.h
settings/cloud_password/settings_cloud_password_start.cpp
settings/cloud_password/settings_cloud_password_start.h
settings/cloud_password/settings_cloud_password_step.cpp
settings/cloud_password/settings_cloud_password_step.h
settings/settings_active_sessions.cpp
settings/settings_active_sessions.h
settings/settings_advanced.cpp
settings/settings_advanced.h
settings/settings_blocked_peers.cpp
@@ -1501,6 +1538,8 @@ PRIVATE
ui/chat/choose_send_as.h
ui/chat/choose_theme_controller.cpp
ui/chat/choose_theme_controller.h
ui/chat/sponsored_message_bar.cpp
ui/chat/sponsored_message_bar.h
ui/controls/emoji_button_factory.cpp
ui/controls/emoji_button_factory.h
ui/controls/location_picker.cpp
@@ -1532,6 +1571,10 @@ PRIVATE
ui/widgets/expandable_peer_list.h
ui/widgets/label_with_custom_emoji.cpp
ui/widgets/label_with_custom_emoji.h
ui/widgets/chat_filters_tabs_strip.cpp
ui/widgets/chat_filters_tabs_strip.h
ui/widgets/peer_bubble.cpp
ui/widgets/peer_bubble.h
ui/countryinput.cpp
ui/countryinput.h
ui/dynamic_thumbnails.cpp
@@ -1543,8 +1586,6 @@ PRIVATE
ui/item_text_options.cpp
ui/item_text_options.h
ui/resize_area.h
ui/search_field_controller.cpp
ui/search_field_controller.h
ui/unread_badge.cpp
ui/unread_badge.h
window/main_window.cpp
@@ -1849,7 +1890,7 @@ endif()
set_target_properties(Telegram PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${output_folder})
if (WIN32 AND CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "MSVC")
if (MSVC)
target_link_libraries(Telegram
PRIVATE
delayimp
@@ -1946,7 +1987,7 @@ if (NOT DESKTOP_APP_DISABLE_AUTOUPDATE AND NOT build_macstore AND NOT build_wins
base/platform/win/base_windows_safe_library.h
)
target_include_directories(Updater PRIVATE ${lib_base_loc})
if (CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "MSVC")
if (MSVC)
target_link_libraries(Updater
PRIVATE
delayimp

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 787 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 500 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 621 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 655 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 820 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 586 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 699 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 718 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 505 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 763 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 963 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 586 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 691 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 615 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 517 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 959 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 791 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 811 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 868 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 997 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 654 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 498 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -72,6 +72,9 @@ var IV = {
}
},
frameKeyDown: function (e) {
const key0 = (e.key === '0')
|| (e.code === 'Key0')
|| (e.keyCode === 48);
const keyW = (e.key === 'w')
|| (e.code === 'KeyW')
|| (e.keyCode === 87);
@@ -81,12 +84,12 @@ var IV = {
const keyM = (e.key === 'm')
|| (e.code === 'KeyM')
|| (e.keyCode === 77);
if ((e.metaKey || e.ctrlKey) && (keyW || keyQ || keyM)) {
if ((e.metaKey || e.ctrlKey) && (keyW || keyQ || keyM || key0)) {
e.preventDefault();
IV.notify({
event: 'keydown',
modifier: e.ctrlKey ? 'ctrl' : 'cmd',
key: keyW ? 'w' : keyQ ? 'q' : 'm',
key: key0 ? '0' : keyW ? 'w' : keyQ ? 'q' : 'm',
});
} else if (e.key === 'Escape' || e.keyCode === 27) {
e.preventDefault();

View File

@@ -18,6 +18,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_menu_activate" = "Use this account";
"lng_menu_set_status" = "Set Emoji Status";
"lng_menu_change_status" = "Change Emoji Status";
"lng_menu_my_profile" = "My Profile";
"lng_menu_my_stories" = "My Stories";
"lng_menu_my_groups" = "My Groups";
"lng_menu_my_channels" = "My Channels";
@@ -288,8 +289,14 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_error_cant_add_member" = "Sorry, you can't add the bot to this group. Ask a group admin to do it.";
"lng_error_cant_add_bot" = "Sorry, this bot can't be added to groups.";
"lng_error_cant_add_admin_invite" = "You can't add this user as an admin because they are not a member of this group and you are not allowed to add them.";
"lng_error_you_blocked_user" = "Sorry, you can't add this user or bot to groups because you've blocked them. Please unblock to proceed.";
"lng_error_add_admin_not_member" = "You can't add this user as an admin because they are not a member of this group and you are not allowed to add them.";
"lng_error_user_admin_invalid" = "You can't ban this user because they are an admin in this group and you are not allowed to demote them.";
"lng_error_channel_bots_too_much" = "Sorry, this channel has too many bots.";
"lng_error_group_bots_too_much" = "There are too many bots in this group. Please remove some of the bots you're not using first.";
"lng_error_cant_add_admin_unban" = "Sorry, you can't add this user as an admin because they are in the Removed Users list and you can't unban them.";
"lng_error_cant_ban_admin" = "You can't ban this user because they are an admin in this group and you are not allowed to demote them.";
"lng_error_cant_reply_other" = "This message can't be replied in another chat.";
"lng_error_admin_limit" = "Sorry, you've reached the maximum number of admins for this group.";
"lng_error_admin_limit_channel" = "Sorry, you've reached the maximum number of admins for this channel.";
"lng_error_post_link_invalid" = "Unfortunately, you can't access this message. You aren't a member of the chat where it was posted.";
@@ -298,6 +305,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_error_nocopy_group" = "Sorry, copying from this group is disabled by admins.";
"lng_error_nocopy_channel" = "Sorry, copying from this channel is disabled by admins.";
"lng_error_nocopy_story" = "Sorry, the creator of this story disabled copying.";
"lng_error_schedule_limit" = "Sorry, you can't schedule more than 100 messages.";
"lng_sure_add_admin_invite" = "This user is not a member of this group. Add them to the group and promote them to admin?";
"lng_sure_add_admin_invite_channel" = "This user is not a subscriber of this channel. Add them to the channel and promote them to admin?";
"lng_sure_add_admin_unremove" = "This user is currently restricted or removed. Are you sure you want to promote them?";
@@ -499,8 +507,9 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_settings_notify_global" = "Global settings";
"lng_settings_notify_title" = "Notifications for chats";
"lng_settings_desktop_notify" = "Desktop notifications";
"lng_settings_native_title" = "Native notifications";
"lng_settings_native_title" = "System integration";
"lng_settings_use_windows" = "Use Windows notifications";
"lng_settings_skip_in_focus" = "Respect system Focus mode";
"lng_settings_use_native_notifications" = "Use native notifications";
"lng_settings_notifications_position" = "Location on the screen";
"lng_settings_notifications_count" = "Notifications count";
@@ -681,6 +690,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_settings_messages_privacy" = "Messages";
"lng_settings_voices_privacy" = "Voice messages";
"lng_settings_bio_privacy" = "Bio";
"lng_settings_gifts_privacy" = "Gifts";
"lng_settings_birthday_privacy" = "Date of Birth";
"lng_settings_privacy_premium" = "Only subscribers of {link} can restrict receiving voice messages.";
"lng_settings_privacy_premium_link" = "Telegram Premium";
@@ -1161,19 +1171,24 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_blocked_list_subtitle#other" = "{count} blocked users";
"lng_edit_privacy_everyone" = "Everybody";
"lng_edit_privacy_no_miniapps" = "Not Mini Apps";
"lng_edit_privacy_contacts" = "My contacts";
"lng_edit_privacy_close_friends" = "Close friends";
"lng_edit_privacy_contacts_and_premium" = "Contacts & Premium";
"lng_edit_privacy_contacts_and_miniapps" = "Contacts & Mini Apps";
"lng_edit_privacy_nobody" = "Nobody";
"lng_edit_privacy_premium" = "Premium users";
"lng_edit_privacy_miniapps" = "Mini Apps";
"lng_edit_privacy_exceptions" = "Add exceptions";
"lng_edit_privacy_user_types" = "User types";
"lng_edit_privacy_users_and_groups" = "Users and groups";
"lng_edit_privacy_premium_status" = "all Telegram Premium subscribers";
"lng_edit_privacy_miniapps_status" = "web mini apps that you use";
"lng_edit_privacy_exceptions_count#one" = "{count} user";
"lng_edit_privacy_exceptions_count#other" = "{count} users";
"lng_edit_privacy_exceptions_premium_and" = "Premium & {users}";
"lng_edit_privacy_exceptions_miniapps_and" = "Mini Apps & {users}";
"lng_edit_privacy_exceptions_add" = "Add users";
"lng_edit_privacy_phone_number_title" = "Phone number privacy";
@@ -1227,6 +1242,14 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_edit_privacy_birthday_yet" = "You haven't entered your date of birth yet.\n{link}";
"lng_edit_privacy_birthday_yet_link" = "Add my birthday >";
"lng_edit_privacy_gifts_title" = "Gifts";
"lng_edit_privacy_gifts_header" = "Who can display gifts on my profile";
"lng_edit_privacy_gifts_always_empty" = "Always allow";
"lng_edit_privacy_gifts_never_empty" = "Never allow";
"lng_edit_privacy_gifts_exceptions" = "Choose whether gifts from specific senders need your approval before they're visible to others on your profile.";
"lng_edit_privacy_gifts_always_title" = "Always allow";
"lng_edit_privacy_gifts_never_title" = "Never allow";
"lng_edit_privacy_calls_title" = "Calls";
"lng_edit_privacy_calls_header" = "Who can call me";
"lng_edit_privacy_calls_always_empty" = "Always allow";
@@ -1458,13 +1481,19 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_profile_enable_notifications" = "Notifications";
"lng_profile_send_message" = "Send Message";
"lng_profile_open_app" = "Open App";
"lng_profile_open_app_short" = "Open";
"lng_profile_open_app_about" = "By launching this mini app, you agree to the {terms}.";
"lng_profile_open_app_terms" = "Terms of Service for Mini Apps";
"lng_profile_bot_permissions_title" = "Allow access to";
"lng_profile_bot_emoji_status_access" = "Emoji Status";
"lng_info_add_as_contact" = "Add to contacts";
"lng_profile_shared_media" = "Shared media";
"lng_profile_suggest_photo" = "Suggest Profile Photo";
"lng_profile_suggest_photo_from_clipboard" = "Suggest From Clipboard";
"lng_profile_set_photo_for" = "Set Profile Photo";
"lng_profile_set_photo_for_from_clipboard" = "Set From Clipboard";
"lng_profile_photo_reset" = "Reset to Original";
"lng_profile_photo_from_clipboard" = "From clipboard";
"lng_profile_suggest_sure" = "You can suggest {user} to set this photo for their Telegram profile.";
"lng_profile_suggest_button" = "Suggest";
"lng_profile_set_personal_sure" = "Only you will see this photo and it will replace any photo {user} sets for themselves.";
@@ -1522,6 +1551,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_manage_channel_title" = "Manage Channel";
"lng_manage_bot_title" = "Manage Bot";
"lng_manage_peer_recent_actions" = "Recent actions";
"lng_manage_peer_star_ref" = "Affiliate programs";
"lng_manage_peer_members" = "Members";
"lng_manage_peer_subscribers" = "Subscribers";
"lng_manage_peer_administrators" = "Administrators";
@@ -1593,11 +1623,132 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_manage_peer_bot_public_link" = "Public Link";
"lng_manage_peer_bot_public_links" = "Public Links";
"lng_manage_peer_bot_balance" = "Balance";
"lng_manage_peer_bot_balance_currency" = "Toncoin";
"lng_manage_peer_bot_balance_credits" = "Stars";
"lng_manage_peer_bot_star_ref" = "Affiliate Program";
"lng_manage_peer_bot_star_ref_off" = "Off";
"lng_manage_peer_bot_star_ref_about" = "Share a link to {bot} with your friends and earn {amount} of their spending there.";
"lng_manage_peer_bot_verify" = "Verify Accounts";
"lng_manage_peer_bot_edit_intro" = "Edit Intro";
"lng_manage_peer_bot_edit_commands" = "Edit Commands";
"lng_manage_peer_bot_edit_settings" = "Change Bot Settings";
"lng_manage_peer_bot_about" = "Use {bot} to manage this bot.";
"lng_bot_verify_title" = "Choose Chat to Verify";
"lng_bot_verify_bot_title" = "Verify Bot";
"lng_bot_verify_bot_text" = "Do you want to verify {name} with your verification mark and description?";
"lng_bot_verify_bot_about" = "You can customize your description for each bot.";
"lng_bot_verify_bot_submit" = "Verify Bot";
"lng_bot_verify_bot_sent" = "{name} has been notified and will receive your verification mark and description upon accepting.";
"lng_bot_verify_bot_remove" = "This bot is already verified by you. Do you want to remove verification?";
"lng_bot_verify_user_title" = "Verify User";
"lng_bot_verify_user_text" = "Do you want to verify {name} with your verification mark and description?";
"lng_bot_verify_user_about" = "You can customize your description for each account.";
"lng_bot_verify_user_submit" = "Verify User";
"lng_bot_verify_user_sent" = "{name} has been notified and will receive your verification mark and description upon accepting.";
"lng_bot_verify_user_remove" = "This account is already verified by you. Do you want to remove verification?";
"lng_bot_verify_channel_title" = "Verify Channel";
"lng_bot_verify_channel_text" = "Do you want to verify {name} with your verification mark and description?";
"lng_bot_verify_channel_about" = "You can customize your description for each channel.";
"lng_bot_verify_channel_submit" = "Verify Channel";
"lng_bot_verify_channel_sent" = "{name} has been notified and will receive your verification mark and description upon accepting.";
"lng_bot_verify_channel_remove" = "This channel is already verified by you. Do you want to remove verification?";
"lng_bot_verify_group_title" = "Verify Group";
"lng_bot_verify_group_text" = "Do you want to verify {name} with your verification mark and description?";
"lng_bot_verify_group_about" = "You can customize your description for each group.";
"lng_bot_verify_group_submit" = "Verify Group";
"lng_bot_verify_group_sent" = "{name} has been notified and will receive your verification mark and description upon accepting.";
"lng_bot_verify_group_remove" = "This group is already verified by you. Do you want to remove verification?";
"lng_bot_verify_description_label" = "Description";
"lng_bot_verify_remove_title" = "Remove verification";
"lng_bot_verify_remove_submit" = "Remove";
"lng_bot_verify_remove_done" = "You've removed this verification.";
"lng_star_ref_title" = "Affiliate Program";
"lng_star_ref_about" = "Reward those who help grow your user base.";
"lng_star_ref_share_title" = "Share revenue with affiliates";
"lng_star_ref_share_about" = "Set the commission for revenue generated by users referred to you.";
"lng_star_ref_launch_title" = "Launch your affiliate program";
"lng_star_ref_launch_about" = "Telegram will feature your program for millions of potential affiliates.";
"lng_star_ref_let_title" = "Let affiliate promote you";
"lng_star_ref_let_about" = "Affiliates will share your referral link with their audience.";
"lng_star_ref_commission_title" = "Commission";
"lng_star_ref_commission_about" = "Define the percentage of star revenue your affiliates earn for referring users to your bot.";
"lng_star_ref_duration_title" = "Duration";
"lng_star_ref_duration_about" = "Set the duration for which affiliates will earn commissions from referred users.";
"lng_star_ref_existing_title" = "View existing programs";
"lng_star_ref_existing_about" = "Explore what other mini apps offer.";
"lng_star_ref_add_bot" = "Add {bot}";
"lng_star_ref_end" = "End Affiliate Program";
"lng_star_ref_start" = "Start Affiliate Program";
"lng_star_ref_start_disabled" = "Available in {time}";
"lng_star_ref_start_info" = "By creating an affiliate program, you agree to the {terms} of Affiliate Programs.";
"lng_star_ref_update" = "Update Affiliate Program";
"lng_star_ref_update_info" = "By updating an affiliate program, you agree to the {terms} of Affiliate Programs.";
"lng_star_ref_button_link" = "terms and conditions";
"lng_star_ref_tos_url" = "https://telegram.org/tos/mini-apps";
"lng_star_ref_warning_title" = "Warning";
"lng_star_ref_warning_text" = "Once you start the affiliate program, you won't be able to decrease its commission or duration. You can only increase these parameters or end the program, which will disable all previously distributed referral links.";
"lng_star_ref_warning_change" = "This change is irreversible. You won't be able to reduce commission or duration. You can only increase these parameters or end the program, which will disable all previously shared referral links.";
"lng_star_ref_warning_start" = "Start";
"lng_star_ref_warning_update" = "Update";
"lng_star_ref_warning_if_end" = "If you end your affiliate program:";
"lng_star_ref_warning_if_end1" = "Any referral links already shared will be disabled in **24** hours.";
"lng_star_ref_warning_if_end2" = "All participating affiliates will be notified.";
"lng_star_ref_warning_if_end3" = "You will be able to start a new affiliate program only in **24** hours.";
"lng_star_ref_warning_end" = "End Anyway";
"lng_star_ref_created_title" = "Affiliate program started";
"lng_star_ref_created_text" = "Any Telegram user, channel owner or mini app developer can now join your program.";
"lng_star_ref_updated_title" = "Affiliate program updated";
"lng_star_ref_updated_text" = "Any Telegram user, channel owner or mini app developer can join your program.";
"lng_star_ref_ended_title" = "Affiliate program ended";
"lng_star_ref_ended_text" = "Participating affiliates have been notified. All referral links will be disabled in **24** hours.";
"lng_star_ref_list_title" = "Affiliate Programs";
"lng_star_ref_list_about_channel" = "Promote mini apps to your subscribers and earn a share of their revenue in Stars.";
"lng_star_ref_list_text" = "Earn a commission each time a user who first accessed a mini app through your referral link spends **Stars** within it.";
"lng_star_ref_list_my" = "My Programs";
"lng_star_ref_list_my_open" = "Open App";
"lng_star_ref_list_my_copy" = "Copy Link";
"lng_star_ref_list_my_leave" = "Leave";
"lng_star_ref_list_subtitle" = "Programs";
"lng_star_ref_sort_text" = "Sort by {sort}";
"lng_star_ref_sort_profitability" = "Profitability";
"lng_star_ref_sort_date" = "Date";
"lng_star_ref_sort_revenue" = "Revenue";
"lng_star_ref_reliable_title" = "Reliable";
"lng_star_ref_reliable_about" = "Receive guaranteed commissions for spending by users you refer.";
"lng_star_ref_transparent_title" = "Transparent";
"lng_star_ref_transparent_about" = "Track your commissions from referred users in real time.";
"lng_star_ref_simple_title" = "Simple";
"lng_star_ref_simple_about" = "Choose a mini app below, get your referral link, and start earning Stars.";
"lng_star_ref_duration_forever" = "Forever";
"lng_star_ref_one_about" = "{app} will share {amount} of the revenue from each user you refer to it {duration}.";
"lng_star_ref_one_about_for_forever" = "for **lifetime**";
"lng_star_ref_one_about_for_months#one" = "for **{count} month**";
"lng_star_ref_one_about_for_months#other" = "for **{count} months**";
"lng_star_ref_one_about_for_years#one" = "for **{count} year**";
"lng_star_ref_one_about_for_years#other" = "for **{count} years**";
"lng_star_ref_one_daily_revenue" = "Daily revenue per user: {amount}";
"lng_star_ref_one_join" = "Join Program";
"lng_star_ref_one_join_text" = "By joining this program, you agree to the {terms} of Affiliate Programs.";
"lng_star_ref_joined_title" = "Program joined";
"lng_star_ref_joined_text" = "You can now copy the referral link.";
"lng_star_ref_link_title" = "Referral Link";
"lng_star_ref_link_about_channel" = "Share this link with your subscribers to earn a {amount} commission on their spending in {app} {duration}.";
"lng_star_ref_link_about_user" = "Share this link with your friends to earn a {amount} commission on their spending in {app} {duration}.";
"lng_star_ref_link_about_bot" = "Share this link with your users to earn a {amount} commission on their spending in {app} {duration}.";
"lng_star_ref_link_recipient" = "Commissions will be sent to:";
"lng_star_ref_link_copy" = "Copy Link";
"lng_star_ref_link_copy_none" = "No one have opened {app} through this link.";
"lng_star_ref_link_copy_users#one" = "{count} user have opened {app} through this link.";
"lng_star_ref_link_copy_users#other" = "{count} users have opened {app} through this link.";
"lng_star_ref_link_copied_title" = "Link copied to clipboard";
"lng_star_ref_link_copied_text" = "Share this link and earn {amount} of what people who use it spend in {app}!";
"lng_star_ref_stopped" = "This affiliate link is no longer active.";
"lng_star_ref_revoke_title" = "Revoke Link";
"lng_star_ref_revoke_text" = "Are you sure you want to revoke the link of {bot}?";
"lng_star_ref_revoked_title" = "Link removed";
"lng_star_ref_revoked_text" = "It will no longer work.";
"lng_manage_discussion_group" = "Discussion";
"lng_manage_discussion_group_add" = "Add a group";
@@ -1839,6 +1990,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_action_payment_init_recurring_for" = "You successfully transferred {amount} to {user} for {invoice} and allowed future recurring payments";
"lng_action_payment_init_recurring" = "You successfully transferred {amount} to {user} and allowed future recurring payments";
"lng_action_payment_used_recurring" = "You were charged {amount} via recurring payment";
"lng_action_payment_bot_done" = "Bot connected to this account received {amount}";
"lng_action_payment_bot_recurring" = "Bot connected to this account received {amount} via recurring payment";
"lng_action_took_screenshot" = "{from} took a screenshot!";
"lng_action_you_took_screenshot" = "You took a screenshot!";
"lng_action_bot_allowed_from_domain" = "You allowed this bot to message you when you logged in on {domain}.";
@@ -1863,19 +2016,36 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_action_proximity_distance_km#other" = "{count} km";
"lng_action_webview_data_done" = "Data from the \"{text}\" button was transferred to the bot.";
"lng_action_gift_received" = "{user} sent you a gift for {cost}";
"lng_action_gift_unique_received" = "{user} sent you a unique collectible item";
"lng_action_gift_sent" = "You sent a gift for {cost}";
"lng_action_gift_unique_sent" = "You sent a unique collectible item";
"lng_action_gift_upgraded" = "{user} turned the gift from you into a unique collectible";
"lng_action_gift_upgraded_mine" = "You turned the gift from {user} into a unique collectible";
"lng_action_gift_upgraded_self" = "You turned this gift into a unique collectible";
"lng_action_gift_transferred" = "{user} transferred you a gift";
"lng_action_gift_transferred_mine" = "You transferred a gift to {user}";
"lng_action_gift_received_anonymous" = "Unknown user sent you a gift for {cost}";
"lng_action_gift_self_bought" = "You bought a gift for {cost}";
"lng_action_gift_self_subtitle" = "Saved Gift";
"lng_action_gift_self_about#one" = "Display this gift on your page or convert it to **{count}** Star.";
"lng_action_gift_self_about#other" = "Display this gift on your page or convert it to **{count}** Stars.";
"lng_action_gift_self_about_unique" = "You can display this gift on your page or turn it into unique collectible and send to others.";
"lng_action_gift_for_stars#one" = "{count} Star";
"lng_action_gift_for_stars#other" = "{count} Stars";
"lng_action_gift_got_subtitle" = "Gift from {user}";
"lng_action_gift_got_stars_text#one" = "Display this gift on your page or convert it to **{count}** Star.";
"lng_action_gift_got_stars_text#other" = "Display this gift on your page or convert it to **{count}** Stars.";
"lng_action_gift_got_upgradable_text" = "Upgrade this gift to a unique collectible.";
"lng_action_gift_got_gift_text" = "You can keep this gift on your page.";
"lng_action_gift_can_remove_text" = "You can remove this gift from your page.";
"lng_action_gift_sent_subtitle" = "Gift for {user}";
"lng_action_gift_sent_text#one" = "{user} can display this gift on their page or convert it to {count} Star.";
"lng_action_gift_sent_text#other" = "{user} can display this gift on their page or convert it to {count} Stars.";
"lng_action_gift_sent_upgradable" = "{user} can upgrade this gift to a unique collectible.";
"lng_action_gift_premium_months#one" = "{count} Month Premium";
"lng_action_gift_premium_months#other" = "{count} Months Premium";
"lng_action_gift_premium_about" = "Subscription for exclusive Telegram features.";
"lng_action_gift_refunded" = "This gift was downgraded because a request to refund the payment related to this gift was made, and the money was returned.";
"lng_action_suggested_photo_me" = "You suggested this photo for {user}'s Telegram profile.";
"lng_action_suggested_photo" = "{user} suggests this photo for your Telegram profile.";
"lng_action_suggested_photo_button" = "View Photo";
@@ -2097,6 +2267,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_channel_public_link_copied" = "Link copied to clipboard.";
"lng_context_about_private_link" = "This link will only work for members of this chat.";
"lng_public_post_private_hint_ctrl" = "Use Ctrl+Click to copy a non-public link.";
"lng_public_post_private_hint_cmd" = "Use Cmd+Click to copy a non-public link.";
"lng_forwarded" = "Forwarded from {user}";
"lng_forwarded_story" = "Story from {user}";
@@ -2115,8 +2287,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_recommended_message_title" = "Recommended";
"lng_edited" = "edited";
"lng_commented" = "commented";
"lng_approximate" = "appx.";
"lng_edited_date" = "Edited: {date}";
"lng_sent_date" = "Sent: {date}";
"lng_approximate_about" = "Estimated date of video publishing.";
"lng_views_tooltip#one" = "Views: {count}";
"lng_views_tooltip#other" = "Views: {count}";
"lng_forwards_tooltip#one" = "Shares: {count}";
@@ -2151,6 +2325,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_media_cancel" = "Cancel";
"lng_media_video" = "Video";
"lng_media_audio" = "Voice message";
"lng_media_round" = "Video message";
"lng_media_auto_settings" = "Automatic media download";
"lng_media_auto_in_private" = "In private chats";
@@ -2267,11 +2442,14 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_premium_summary_about_business" = "Upgrade your account with business features such as location, opening hours and quick replies.";
"lng_premium_summary_subtitle_effects" = "Message Effects";
"lng_premium_summary_about_effects" = "Add over 500 animated effects to private messages.";
"lng_premium_summary_subtitle_filter_tags" = "Tag Your Chats";
"lng_premium_summary_about_filter_tags" = "Display folder names for each chat in the chat list.";
"lng_premium_summary_bottom_subtitle" = "About Telegram Premium";
"lng_premium_summary_bottom_about" = "While the free version of Telegram already gives its users more than any other messaging application, **Telegram Premium** pushes its capabilities even further.\n\n**Telegram Premium** is a paid option, because most Premium Features require additional expenses from Telegram to third parties such as data center providers and server manufacturers. Contributions from **Telegram Premium** users allow us to cover such costs and also help Telegram stay free for everyone.";
"lng_premium_summary_button" = "Subscribe for {cost} per month";
"lng_premium_summary_new_badge" = "NEW";
"lng_soon_badge" = "Soon";
"lng_premium_success" = "You've successfully subscribed to Telegram Premium!";
"lng_premium_unavailable" = "This feature requires subscription to **Telegram Premium**.\n\nUnfortunately, **Telegram Premium** is not available in your region.";
@@ -2399,11 +2577,17 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_credits_summary_options_about" = "By proceeding and purchasing Stars, you agree with the {link}.";
"lng_credits_summary_options_about_link" = "Terms and Conditions";
"lng_credits_summary_options_about_url" = "https://telegram.org/tos/stars";
"lng_credits_summary_earn_title" = "Earn Stars";
"lng_credits_summary_earn_about" = "Distribute links to mini apps and earn a share of their revenue in Stars.";
"lng_credits_summary_history_tab_full" = "All Transactions";
"lng_credits_summary_history_tab_in" = "Incoming";
"lng_credits_summary_history_tab_out" = "Outgoing";
"lng_credits_summary_history_entry_inner_in" = "In-App Purchase";
"lng_credits_summary_balance" = "Balance";
"lng_credits_commission" = "{amount} commission";
"lng_credits_more_options" = "More Options";
"lng_credits_balance_me" = "your balance";
"lng_credits_buy_button" = "Buy More Stars";
"lng_credits_gift_button" = "Gift Stars to Friends";
"lng_credits_box_out_title" = "Confirm Your Purchase";
"lng_credits_box_out_sure#one" = "Do you want to buy **\"{text}\"** in **{bot}** for **{count} Star**?";
@@ -2412,6 +2596,12 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_credits_box_out_media#other" = "Do you want to unlock {media} in {chat} for **{count} Stars**?";
"lng_credits_box_out_media_user#one" = "Do you want to unlock {media} from {user} for **{count} Star**?";
"lng_credits_box_out_media_user#other" = "Do you want to unlock {media} from {user} for **{count} Stars**?";
"lng_credits_box_out_subscription_bot#one" = "Do you want to subscribe to **{title}** in **{recipient}** for **{count}** star per month?";
"lng_credits_box_out_subscription_bot#other" = "Do you want to subscribe to **{title}** in **{recipient}** for **{count}** stars per month?";
"lng_credits_box_out_subscription_business#one" = "Do you want to subscribe to **{title}** from **{recipient}** for **{count}** star per month?";
"lng_credits_box_out_subscription_business#other" = "Do you want to subscribe to **{title}** from **{recipient}** for **{count}** stars per month?";
"lng_credits_box_out_subscription_confirm#one" = "Subscribe for {emoji} {count} / month";
"lng_credits_box_out_subscription_confirm#other" = "Subscribe for {emoji} {count} / month";
"lng_credits_box_out_photo" = "a photo";
"lng_credits_box_out_photos#one" = "{count} photo";
"lng_credits_box_out_photos#other" = "{count} photos";
@@ -2433,6 +2623,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_credits_summary_in_toast_about#other" = "**{count}** Stars added to your balance.";
"lng_credits_box_history_entry_peer" = "Recipient";
"lng_credits_box_history_entry_peer_in" = "From";
"lng_credits_box_history_entry_gift_from" = "Gift From";
"lng_credits_box_history_entry_via" = "Via";
"lng_credits_box_history_entry_play_market" = "Play Store";
"lng_credits_box_history_entry_app_store" = "App Store";
@@ -2442,22 +2633,35 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_credits_box_history_entry_giveaway_name" = "Received Prize";
"lng_credits_box_history_entry_gift_sent" = "Sent Gift";
"lng_credits_box_history_entry_gift_converted" = "Converted Gift";
"lng_credits_box_history_entry_gift_transfer" = "Gift Transfer";
"lng_credits_box_history_entry_gift_unavailable" = "Unavailable";
"lng_credits_box_history_entry_gift_sold_out" = "This gift has sold out";
"lng_credits_box_history_entry_gift_out_about" = "With Stars, **{user}** will be able to unlock content and services on Telegram.\n{link}";
"lng_credits_box_history_entry_gift_in_about" = "Use Stars to unlock content and services on Telegram. {link}";
"lng_credits_box_history_entry_gift_about_link" = "See Examples {emoji}";
"lng_credits_box_history_entry_gift_examples" = "Examples";
"lng_credits_box_history_entry_ads" = "Ads Platform";
"lng_credits_box_history_entry_premium_bot" = "Stars Top-Up";
"lng_credits_box_history_entry_api" = "Paid Broadcast";
"lng_credits_box_history_entry_floodskip_about#one" = "{count} Message";
"lng_credits_box_history_entry_floodskip_about#other" = "{count} Messages";
"lng_credits_box_history_entry_floodskip_row" = "Messages";
"lng_credits_box_history_entry_via_premium_bot" = "Premium Bot";
"lng_credits_box_history_entry_id" = "Transaction ID";
"lng_credits_box_history_entry_id_copied" = "Transaction ID copied to clipboard.";
"lng_credits_box_history_entry_reason_star_ref" = "Affiliate Program";
"lng_credits_box_history_entry_affiliate" = "Affiliate";
"lng_credits_box_history_entry_miniapp" = "Mini App";
"lng_credits_box_history_entry_referred" = "Referred User";
"lng_credits_box_history_entry_success_date" = "Transaction date";
"lng_credits_box_history_entry_success_url" = "Transaction link";
"lng_credits_box_history_entry_media" = "Media";
"lng_credits_box_history_entry_message" = "Message";
"lng_credits_box_history_entry_about" = "You can dispute this transaction {link}.";
"lng_credits_box_history_entry_about_link" = "here";
"lng_credits_box_history_entry_reaction_name" = "Star Reaction";
"lng_credits_box_history_entry_subscription" = "Monthly subscription fee";
"lng_credits_box_history_entry_gift_upgrade" = "Collectible Upgrade";
"lng_credits_subscription_section" = "My subscriptions";
"lng_credits_box_subscription_title" = "Subscription";
@@ -2465,6 +2669,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_credits_subscriber_subtitle" = "appx. {total} per month";
"lng_credits_subscription_row_to" = "Subscription";
"lng_credits_subscription_row_to_bot" = "Bot";
"lng_credits_subscription_row_to_business" = "Business";
"lng_credits_subscription_row_from" = "Subscribed";
"lng_credits_subscription_row_next_on" = "Renews";
@@ -2475,13 +2681,16 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_credits_subscription_on_about" = "If you cancel now, you will still be able to access your subscription until {date}.";
"lng_credits_subscription_off_button" = "Renew Subscription";
"lng_credits_subscription_off_rejoin_button" = "Subscribe again";
"lng_credits_subscription_off_about" = "You have canceled your subscription.";
"lng_credits_subscription_off_by_bot_about" = "{bot} has canceled your subscription.";
"lng_credits_subscription_status_on" = "renews on {date}";
"lng_credits_subscription_status_off" = "expires on {date}";
"lng_credits_subscription_status_none" = "expired on {date}";
"lng_credits_subscription_status_off_right" = "canceled";
"lng_credits_subscription_status_none_right" = "expired";
"lng_credits_subscription_status_off_by_bot_right" = "canceled\nby bot";
"lng_credits_small_balance_title#one" = "{count} Star Needed";
"lng_credits_small_balance_title#other" = "{count} Stars Needed";
@@ -2988,6 +3197,9 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_gift_link_reason_unclaimed" = "Incomplete Giveaway";
"lng_gift_link_reason_chosen" = "You were selected by the channel";
"lng_gift_link_label_date" = "Date";
"lng_gift_link_label_first_sale" = "First Sale";
"lng_gift_link_label_last_sale" = "Last Sale";
"lng_gift_link_label_value" = "Value";
"lng_gift_link_also_send" = "You can also {link} to a friend as a gift.";
"lng_gift_link_also_send_link" = "send this link";
"lng_gift_link_use" = "Use Link";
@@ -3020,32 +3232,67 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_gift_stars_sold_out" = "sold out";
"lng_gift_stars_tabs_all" = "All Gifts";
"lng_gift_stars_tabs_limited" = "Limited";
"lng_gift_stars_tabs_in_stock" = "In Stock";
"lng_gift_send_title" = "Send a Gift";
"lng_gift_send_message" = "Enter Message";
"lng_gift_send_anonymous" = "Hide My Name";
"lng_gift_send_anonymous_self" = "Hide my name and message from visitors to my profile.";
"lng_gift_send_anonymous_about" = "You can hide your name and message from visitors to {user}'s profile. {recipient} will still see your name and message.";
"lng_gift_send_unique" = "Make Unique for {price}";
"lng_gift_send_unique_about" = "Enable this to let {user} turn your gift into a unique collectible. {link}";
"lng_gift_send_unique_link" = "Learn More >";
"lng_gift_send_premium_about" = "Only {user} will see your message.";
"lng_gift_send_button" = "Send a Gift for {cost}";
"lng_gift_send_button_self" = "Buy a Gift for {cost}";
"lng_gift_sent_title" = "Gift Sent!";
"lng_gift_sent_about#one" = "You spent **{count}** Star from your balance.";
"lng_gift_sent_about#other" = "You spent **{count}** Stars from your balance.";
"lng_gift_limited_of_one" = "unique";
"lng_gift_limited_of_count" = "1 of {amount}";
"lng_gift_collectible_tag" = "gift";
"lng_gift_price_unique" = "Unique";
"lng_gift_view_unpack" = "Unpack";
"lng_gift_anonymous_hint" = "Only you can see the sender's name.";
"lng_gift_hidden_hint" = "This gift is hidden. Only you can see it.";
"lng_gift_visible_hint" = "This gift is visible to visitors of your page.";
"lng_gift_availability" = "Availability";
"lng_gift_from_hidden" = "Hidden User";
"lng_gift_visibility" = "Visibility";
"lng_gift_visibility_shown" = "Visible on your page";
"lng_gift_visibility_hidden" = "Not visible on your page";
"lng_gift_visibility_show" = "show";
"lng_gift_visibility_hide" = "hide";
"lng_gift_self_status" = "buy yourself a gift";
"lng_gift_self_title" = "Buy a Gift";
"lng_gift_self_about" = "Buy yourself a gift to display on your page or reserve for later.\n\nLimited-edition gifts upgraded to collectibles can be gifted to others later.";
"lng_gift_unique_owner" = "Owner";
"lng_gift_unique_owner_change" = "change";
"lng_gift_unique_status" = "Status";
"lng_gift_unique_status_non" = "Non-Unique";
"lng_gift_unique_status_upgrade" = "upgrade";
"lng_gift_unique_number" = "Collectible #{index}";
"lng_gift_unique_model" = "Model";
"lng_gift_unique_backdrop" = "Backdrop";
"lng_gift_unique_symbol" = "Symbol";
"lng_gift_unique_rarity" = "Only {percent} of such collectibles have this attribute.";
"lng_gift_unique_availability#one" = "{count} of {amount} issued";
"lng_gift_unique_availability#other" = "{count} of {amount} issued";
"lng_gift_unique_info" = "Gifted to {recipient} on {date}.";
"lng_gift_unique_info_sender" = "Gifted by {from} to {recipient} on {date}.";
"lng_gift_unique_info_sender_comment" = "Gifted by {from} to {recipient} on {date} with the comment \"{text}\".";
"lng_gift_unique_info_reciever" = "Gifted to {recipient} on {date}.";
"lng_gift_unique_info_reciever_comment" = "Gifted to {recipient} on {date} with the comment \"{text}\".";
"lng_gift_availability_left#one" = "{count} of {amount} left";
"lng_gift_availability_left#other" = "{count} of {amount} left";
"lng_gift_availability_none" = "None of {amount} left";
"lng_gift_display_on_page" = "Display on my Page";
"lng_gift_display_on_page_hide" = "Hide from my Page";
"lng_gift_convert_to_stars#one" = "Convert to {count} Star";
"lng_gift_convert_to_stars#other" = "Convert to {count} Stars";
"lng_gift_convert_sure_title" = "Convert Gift to Stars";
"lng_gift_convert_sure_text#one" = "Do you want to convert this gift from {user} to **{count} Star**?\n\nThis action cannot be undone.";
"lng_gift_convert_sure_text#other" = "Do you want to convert this gift from {user} to **{count} Stars**?\n\nThis action cannot be undone.";
"lng_gift_convert_sure_confirm#one" = "Do you want to convert this gift from {user} to **{count} Star**?";
"lng_gift_convert_sure_confirm#other" = "Do you want to convert this gift from {user} to **{count} Stars**?";
"lng_gift_convert_sure_limit#one" = "Conversion is available for the next **{count} day**.";
"lng_gift_convert_sure_limit#other" = "Conversion is available for the next **{count} days**.";
"lng_gift_convert_sure_caution" = "This action cannot be undone. This will permanently destroy the gift.";
"lng_gift_convert_sure" = "Convert";
"lng_gift_display_done" = "The gift is now shown on your profile page.";
"lng_gift_display_done_hide" = "The gift is now hidden from your profile page.";
@@ -3054,6 +3301,48 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_gift_sold_out_title" = "Sold Out!";
"lng_gift_sold_out_text#one" = "All {count} gift was already sold.";
"lng_gift_sold_out_text#other" = "All {count} gifts were already sold.";
"lng_gift_send_small" = "send a gift";
"lng_gift_sell_small#one" = "sell for {count} Star";
"lng_gift_sell_small#other" = "sell for {count} Stars";
"lng_gift_upgrade_title" = "Upgrade Gift";
"lng_gift_upgrade_about" = "Turn your gift into a unique collectible\nthat you can transfer or auction.";
"lng_gift_upgrade_preview_title" = "Make Unique";
"lng_gift_upgrade_preview_about" = "Let {name} turn your gift into a unique collectible.";
"lng_gift_upgrade_unique_title" = "Unique";
"lng_gift_upgrade_unique_about" = "Get a unique number, model, backdrop and symbol for your gift.";
"lng_gift_upgrade_transferable_title" = "Transferable";
"lng_gift_upgrade_transferable_about" = "Send your upgraded gift to any of your friends on Telegram.";
"lng_gift_upgrade_tradable_title" = "Tradable";
"lng_gift_upgrade_tradable_about" = "Sell or auction your gift on third-party NFT marketplaces.";
"lng_gift_upgrade_button" = "Upgrade for {price}";
"lng_gift_upgrade_free" = "Upgrade for Free";
"lng_gift_upgrade_confirm" = "Confirm";
"lng_gift_upgrade_add_my" = "Add my name to the gift";
"lng_gift_upgrade_add_my_comment" = "Add my name and comment";
"lng_gift_upgrade_add_sender" = "Add sender's name to the gift";
"lng_gift_upgrade_add_comment" = "Add sender's name and comment";
"lng_gift_upgraded_title" = "Gift Upgraded";
"lng_gift_upgraded_about" = "Your gift {name} now has unique attributes and can be transferred to others";
"lng_gift_transferred_title" = "Gift Transferred";
"lng_gift_transferred_about" = "{name} was successfully transferred to {recipient}.";
"lng_gift_transfer_title" = "Transfer {name}";
"lng_gift_transfer_via_blockchain" = "Send via Blockchain";
"lng_gift_transfer_unlocks_days#one" = "unlocks in {count} day";
"lng_gift_transfer_unlocks_days#other" = "unlocks in {count} days";
"lng_gift_transfer_unlocks_hours#one" = "unlocks in {count} hour";
"lng_gift_transfer_unlocks_hours#other" = "unlocks in {count} hours";
"lng_gift_transfer_unlocks_title" = "Unlocking in progress";
"lng_gift_transfer_unlocks_about" = "{when}, you'll be able to send this collectible to any TON blockchain address outside Telegram for sale or auction.";
"lng_gift_transfer_unlocks_when_days#one" = "In {count} day";
"lng_gift_transfer_unlocks_when_days#other" = "In {count} days";
"lng_gift_transfer_unlocks_when_hours#one" = "In {count} hour";
"lng_gift_transfer_unlocks_when_hours#other" = "In {count} hours";
"lng_gift_transfer_unlocks_update_title" = "Update required";
"lng_gift_transfer_unlocks_update_about" = "Please update your Telegram application to the latest version.";
"lng_gift_transfer_sure" = "Do you want to transfer ownership of {name} to {recipient}?";
"lng_gift_transfer_sure_for" = "Do you want to transfer ownership of {name} to {recipient} for {price}?";
"lng_gift_transfer_button" = "Transfer";
"lng_gift_transfer_button_for" = "Transfer for {price}";
"lng_accounts_limit_title" = "Limit Reached";
"lng_accounts_limit1#one" = "You have reached the limit of **{count}** connected account.";
@@ -3243,11 +3532,18 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_record_cancel" = "Release outside this field to cancel";
"lng_record_cancel_stories" = "Release outside to cancel";
"lng_record_lock_cancel_sure" = "Do you want to stop recording and discard your voice message?";
"lng_record_lock_cancel_sure_round" = "Do you want to stop recording and discard your video message?";
"lng_record_listen_cancel_sure" = "Do you want to discard your recorded voice message?";
"lng_record_listen_cancel_sure_round" = "Do you want to discard your recorded video message?";
"lng_record_lock_discard" = "Discard";
"lng_record_hold_tip" = "Please hold the mouse button pressed to record a voice message.";
"lng_record_voice_tip" = "Hold to record audio. Click to switch to video.";
"lng_record_video_tip" = "Hold to record video. Click to switch to audio.";
"lng_record_audio_problem" = "Could not start audio recording. Please check your microphone.";
"lng_record_video_problem" = "Could not start video recording. Please check your camera.";
"lng_record_once_first_tooltip" = "Click to set this message to **Play Once**.";
"lng_record_once_active_tooltip" = "The recipient will be able to listen only once.";
"lng_record_once_active_video" = "The recipient will be able to watch only once.";
"lng_will_be_notified" = "Subscribers will be notified when you post.";
"lng_wont_be_notified" = "Subscribers will receive a silent notification.";
"lng_willbe_history" = "Select a chat to start messaging";
@@ -3276,6 +3572,11 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_scheduled_send_now" = "Send message now?";
"lng_scheduled_send_now_many#one" = "Send {count} message now?";
"lng_scheduled_send_now_many#other" = "Send {count} messages now?";
"lng_scheduled_video_tip_title" = "Improving video...";
"lng_scheduled_video_tip_text" = "The video will be published after it's optimized for the best viewing experience.";
"lng_scheduled_video_tip" = "Processing video may take a few minutes.";
"lng_scheduled_video_published" = "Video Published.";
"lng_scheduled_video_view" = "View";
"lng_replies_view#one" = "View {count} Reply";
"lng_replies_view#other" = "View {count} Replies";
@@ -3298,6 +3599,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_replies_no_comments" = "No comments here yet...";
"lng_verification_codes" = "Verification Codes";
"lng_verification_codes_about" = "Third-party services, like websites and stores, can send verification codes to your phone number via Telegram instead of SMS. Such codes will appear in this chat.\n\nIf you didn't request any codes — don't worry! Most likely, someone made a mistake when entering their number.";
"lng_archived_name" = "Archived chats";
"lng_archived_add" = "Archive";
@@ -3359,6 +3661,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_bot_settings" = "Settings";
"lng_bot_open" = "Open Bot";
"lng_bot_terms" = "Terms of Use";
"lng_bot_privacy" = "Privacy Policy";
"lng_bot_reload_page" = "Reload Page";
"lng_bot_add_to_menu" = "{bot} asks your permission to be added as an option to your attachment menu so you can access it from any chat.";
"lng_bot_add_to_menu_done" = "Bot added to the menu.";
@@ -3374,6 +3677,20 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_bot_add_to_side_menu_done" = "Bot added to the main menu.";
"lng_bot_no_scan_qr" = "QR Codes for bots are not supported on Desktop. Please use one of Telegram's mobile apps.";
"lng_bot_no_share_story" = "Sharing to Stories is not supported on Desktop. Please use one of Telegram's mobile apps.";
"lng_bot_emoji_status_confirm" = "Confirm";
"lng_bot_emoji_status_title" = "Set Emoji Status";
"lng_bot_emoji_status_text" = "Do you want to set this emoji status suggested by {bot}?";
"lng_bot_emoji_status_access_text" = "{bot} requests access to set your **emoji status**. You will be able to revoke this access in the profile page of {name}.";
"lng_bot_emoji_status_access_allow" = "Allow";
"lng_bot_share_prepared_title" = "Share Message";
"lng_bot_share_prepared_about" = "{bot} mini app suggests you to send this message to a chat you select.";
"lng_bot_share_prepared_button" = "Share With...";
"lng_bot_download_file" = "Download File";
"lng_bot_download_file_sure" = "{bot} suggests you download the following file:";
"lng_bot_download_file_button" = "Download";
"lng_bot_download_starting" = "Starting...";
"lng_bot_download_failed" = "Failed. {retry}";
"lng_bot_download_retry" = "Retry";
"lng_bot_status_users#one" = "{count} monthly user";
"lng_bot_status_users#other" = "{count} monthly users";
@@ -3457,6 +3774,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_context_mark_read_sure" = "Are you sure you want to mark all chats from this folder as read?";
"lng_context_mark_read_all" = "Mark all chats as read";
"lng_context_mark_read_all_sure" = "Are you sure you want to mark all chats as read?";
"lng_context_mark_read_all_sure_2" = "**This action cannot be undone.**";
"lng_context_mark_read_mentions_all" = "Mark all mentions as read";
"lng_context_mark_read_reactions_all" = "Read all reactions";
"lng_context_archive_expand" = "Expand";
@@ -3585,6 +3903,9 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_context_make_paid" = "Make This Content Paid";
"lng_context_change_price" = "Change Price";
"lng_context_mention" = "Mention";
"lng_context_search_from" = "Search messages";
"lng_factcheck_title" = "Fact Check";
"lng_factcheck_placeholder" = "Add Facts or Context";
"lng_factcheck_whats_this" = "what's this?";
@@ -3613,6 +3934,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_paid_react_agree_link" = "Terms of Service";
"lng_paid_react_toast#one" = "Star Sent!";
"lng_paid_react_toast#other" = "Stars Sent!";
"lng_paid_react_toast_anonymous#one" = "Star sent anonymously!";
"lng_paid_react_toast_anonymous#other" = "Stars sent anonymously!";
"lng_paid_react_toast_text#one" = "You reacted with **{count} Star**.";
"lng_paid_react_toast_text#other" = "You reacted with **{count} Stars**.";
"lng_paid_react_undo" = "Undo";
@@ -3682,6 +4005,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_reply_in_another_title" = "Reply in...";
"lng_reply_in_another_chat" = "Reply in Another Chat";
"lng_reply_in_author" = "Message author";
"lng_reply_in_chats_list" = "Your chats";
"lng_reply_show_in_chat" = "Show in Chat";
"lng_reply_remove" = "Do Not Reply";
"lng_reply_about_quote" = "You can select a specific part to quote.";
@@ -3821,6 +4146,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_search_messages_from" = "Show messages from";
"lng_search_messages_n_of_amount" = "{n} of {amount}";
"lng_search_messages_none" = "No results";
"lng_search_filter_all" = "All chats";
"lng_search_filter_private" = "Private chats";
"lng_search_filter_group" = "Group chats";
"lng_search_filter_channel" = "Channels";
"lng_media_save_progress" = "{ready} of {total} {mb}";
"lng_mediaview_save_as" = "Save As...";
@@ -3869,6 +4198,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_mediaview_downloads" = "Downloads";
"lng_mediaview_playback_speed" = "Playback speed: {speed}";
"lng_mediaview_rotate_video" = "Rotate video";
"lng_mediaview_quality_auto" = "Auto";
"lng_theme_preview_title" = "Theme Preview";
"lng_theme_preview_generating" = "Generating color theme preview...";
@@ -3950,7 +4280,9 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"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 (webkitgtk-6.0/webkit2gtk-4.1/webkit2gtk-4.0) using your package manager.";
"lng_payments_webview_install_webkit" = "Please install WebKitGTK (webkit2gtk-4.1/webkit2gtk-4.0) using your package manager.";
"lng_payments_webview_enable_opengl" = "Please enable OpenGL in application settings.";
"lng_payments_webview_switch_x11" = "Unsupported display server. Please switch to X11.";
"lng_payments_webview_update_windows" = "Please update your system to Windows 8.1 or later.";
"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";
@@ -4310,7 +4642,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_rights_edit_admin_rank_about" = "A title that members will see instead of '{title}'.";
"lng_rights_about_add_admins_yes" = "This admin will be able to add new admins with equal or fewer rights.";
"lng_rights_about_add_admins_no" = "This admin will not be able to add new admins.";
"lng_rights_about_by" = "This admin promoted by {user} at {date}.";
"lng_rights_about_by" = "This admin promoted by {user} on {date}.";
"lng_rights_about_admin_cant_edit" = "You can't edit the rights of this admin.";
"lng_rights_about_restriction_cant_edit" = "You cannot change the restrictions for this user.";
@@ -4389,8 +4721,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_rights_chat_files" = "Files";
"lng_rights_chat_voice_messages" = "Voice messages";
"lng_rights_chat_video_messages" = "Video messages";
"lng_rights_chat_restricted_by" = "Restricted by {user} at {date}.";
"lng_rights_chat_banned_by" = "Banned by {user} at {date}.";
"lng_rights_chat_restricted_by" = "Restricted by {user} on {date}.";
"lng_rights_chat_banned_by" = "Banned by {user} on {date}.";
"lng_rights_chat_banned_until_header" = "Restricted until";
"lng_rights_chat_banned_forever" = "Forever";
"lng_rights_chat_banned_day#one" = "For {count} day";
@@ -4714,6 +5046,17 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_forward_show_captions" = "Show captions";
"lng_forward_change_recipient" = "Change recipient";
"lng_forward_sender_names_removed" = "Sender names removed";
"lng_forward_header_short" = "Forward";
"lng_forward_action_show_sender" = "Show Sender Name";
"lng_forward_action_show_senders" = "Show Sender Names";
"lng_forward_action_hide_sender" = "Hide Sender Name";
"lng_forward_action_hide_senders" = "Hide Sender Names";
"lng_forward_action_show_caption" = "Show Caption";
"lng_forward_action_show_captions" = "Show Captions";
"lng_forward_action_hide_caption" = "Hide Caption";
"lng_forward_action_hide_captions" = "Hide Captions";
"lng_forward_action_change_recipient" = "Change Recipient";
"lng_forward_action_remove" = "Do Not Forward";
"lng_passport_title" = "Telegram Passport";
"lng_passport_request1" = "{bot} requests access to your personal data";
@@ -4999,6 +5342,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_outdated_now" = "So Telegram Desktop can update to newer versions.";
"lng_filters_all" = "All chats";
"lng_filters_all_short" = "All";
"lng_filters_setup" = "Edit";
"lng_filters_title" = "Folders";
"lng_filters_subtitle" = "My folders";
@@ -5014,6 +5358,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_filters_edit" = "Edit Folder";
"lng_filters_setup_menu" = "Edit Folders";
"lng_filters_new_name" = "Folder name";
"lng_filters_enable_animations" = "Enable animations";
"lng_filters_disable_animations" = "Disable animations";
"lng_filters_add_chats" = "Add Chats";
"lng_filters_remove_chats" = "Add Chats to Exclude";
"lng_filters_include" = "Included chats";
@@ -5053,11 +5399,24 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_filters_toast_add" = "{chat} added to {folder} folder";
"lng_filters_toast_remove" = "{chat} removed from {folder} folder";
"lng_filters_shareable_status" = "shareable folder";
"lng_filters_view_subtitle" = "Tabs view";
"lng_filters_vertical" = "Tabs on the left";
"lng_filters_horizontal" = "Tabs at the top";
"lng_filters_enable_tags" = "Show Folder Tags";
"lng_filters_enable_tags_about" = "Display folder names for each chat in the chat list.";
"lng_filters_enable_tags_about_premium" = "Subscribe to **{link}** to display folder names for each chat in the chat list.";
"lng_filters_tag_color_subtitle" = "Folder color in chat list";
"lng_filters_tag_color_about" = "Choose a color for the tag of this folder.";
"lng_filters_tag_color_no" = "No Tag";
"lng_filters_delete_sure" = "Are you sure you want to delete this folder? This will also deactivate all the invite links created to share this folder.";
"lng_filters_link" = "Share Folder";
"lng_filters_link_has" = "Invite links";
"lng_filters_checkbox_remove_bot" = "Remove bot from all folders";
"lng_filters_checkbox_remove_group" = "Remove group from all folders";
"lng_filters_checkbox_remove_channel" = "Remove channel from all folders";
"lng_filters_link_create" = "Create an Invite Link";
"lng_filters_link_cant" = "You cant share folders which include or exclude specific chat types like 'Groups', 'Contacts', etc.";
"lng_filters_link_about" = "Share access to some of this folder's groups and channels with others.";
@@ -5172,13 +5531,19 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_sponsored_revenued_subtitle" = "Telegram Ads are very different from ads on other platforms. Ads such as this one:";
"lng_sponsored_revenued_info1_title" = "Respect Your Privacy";
"lng_sponsored_revenued_info1_description" = "Ads on Telegram do not use your personal information and are based on the channel in which you see them.";
"lng_sponsored_revenued_info1_bot_description" = "Ads on Telegram do not use your personal information and are based on the mini app in which you see them.";
"lng_sponsored_revenued_info2_title" = "Help the Channel Creator";
"lng_sponsored_revenued_info2_bot_title" = "Help the Bot Developer";
"lng_sponsored_revenued_info2_description" = "50% of the revenue from Telegram Ads goes to the owner of the channel where they are displayed.";
"lng_sponsored_revenued_info2_bot_description" = "50% of the revenue from Telegram Ads goes to the developer of the mini app where they are displayed.";
"lng_sponsored_revenued_info3_title" = "Can Be Removed";
"lng_sponsored_revenued_info3_description#one" = "You can turn off ads by subscribing to {link}, and Level {count} channels can remove them for their subscribers.";
"lng_sponsored_revenued_info3_description#other" = "You can turn off ads by subscribing to {link}, and Level {count} channels can remove them for their subscribers.";
"lng_sponsored_revenued_info3_bot_description" = "You can turn off ads in mini apps by subscribing to {link}.";
"lng_sponsored_revenued_footer_title" = "Can I Launch an Ad?";
"lng_sponsored_revenued_footer_description" = "Anyone can create an ad to display in this channel — with minimal budgets. Check out the **Telegram Ad Platform** for details. {link}";
"lng_sponsored_revenued_footer_bot_description" = "Anyone can create an ad to display in this bot — with minimal budgets. Check out the **Telegram Ad Platform** for details. {link}";
"lng_sponsored_top_bar_hide" = "remove";
"lng_telegram_features_url" = "https://t.me/TelegramTips";
@@ -5482,6 +5847,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_channel_earn_title" = "Monetization";
"lng_channel_earn_about" = "Telegram shares 50% of the revenue from ads displayed in your channel as rewards. {link}";
"lng_channel_earn_about_bot" = "Telegram shares 50% of the revenue from ads displayed in your bot. {link}";
"lng_channel_earn_about_link" = "Learn more {emoji}";
"lng_channel_earn_overview_title" = "Rewards overview";
"lng_channel_earn_available" = "Rewards available for collection";
@@ -5514,8 +5880,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_channel_earn_cpm#one" = "{emoji} {count} CPM";
"lng_channel_earn_cpm#other" = "{emoji} {count} CPM";
"lng_channel_earn_learn_title" = "Earn From Your Channel";
"lng_channel_earn_bot_learn_title" = "Earn From Your Bot";
"lng_channel_earn_learn_in_subtitle" = "Telegram Ads";
"lng_channel_earn_learn_in_about" = "Telegram can display ads in your channel.";
"lng_channel_earn_learn_bot_in_about" = "Telegram can display ads in your bot.";
"lng_channel_earn_learn_split_subtitle" = "50:50 revenue split";
"lng_channel_earn_learn_split_about" = "You can receive 50% of the ad revenue as rewards in TON.";
"lng_channel_earn_learn_out_subtitle" = "Flexible withdrawals";
@@ -5552,6 +5920,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_bot_earn_credits_out_minimal" = "You cannot withdraw less than {link}.";
"lng_bot_earn_credits_out_minimal_link#one" = "{count} star";
"lng_bot_earn_credits_out_minimal_link#other" = "{count} stars";
"lng_bot_copy_text_tooltip" = "Copy to Clipboard: {text}";
"lng_contact_add" = "Add";
"lng_contact_send_message" = "Message";
@@ -5562,6 +5931,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_iv_window_title" = "Instant View";
"lng_iv_wrong_layout" = "Wrong layout?";
"lng_iv_not_supported" = "This link appears to be invalid.";
"lng_iv_zoom_tooltip_ctrl" = "Hold Ctrl to zoom by 5%.\nHold Alt to zoom by 1%.";
"lng_iv_zoom_tooltip_cmd" = "Hold Cmd to zoom by 5%.\nHold Alt to zoom by 1%.";
"lng_limit_download_title" = "Download speed limited";
"lng_limit_download_subscribe" = "Subscribe to {link} to increase download speed {increase}.";
@@ -5591,6 +5962,13 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_recent_chats" = "Chats";
"lng_recent_channels" = "Channels";
"lng_recent_apps" = "Apps";
"lng_all_photos" = "Photos";
"lng_all_videos" = "Videos";
"lng_all_downloads" = "Downloads";
"lng_all_links" = "Links";
"lng_all_files" = "Files";
"lng_all_music" = "Music";
"lng_all_voice" = "Voice";
"lng_channels_none_title" = "No channels yet...";
"lng_channels_none_about" = "You are not currently subscribed to any channels.";
"lng_channels_your_title" = "Channels you joined";
@@ -5599,6 +5977,15 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_channels_recommended" = "Similar channels";
"lng_bot_apps_your" = "Apps you use";
"lng_bot_apps_popular" = "Grossing apps";
"lng_bot_apps_which" = "Which apps are included here? {link}";
"lng_bot_apps_which_link" = "Learn >";
"lng_popular_apps_info_title" = "Top Mini Apps";
"lng_popular_apps_info_text" = "This catalogue ranks mini apps based on their daily revenue, measured in Stars. To be listed, developers must set their main mini apps in {bot} (as described {link}), have over **1,000** daily users, and earn a daily revenue above **1,000** Stars, based on the weekly average.";
"lng_popular_apps_info_bot" = "@botfather";
"lng_popular_apps_info_here" = "here";
"lng_popular_apps_info_url" = "https://core.telegram.org/bots/webapps#launching-the-main-mini-app";
"lng_popular_apps_info_confirm" = "Understood";
"lng_font_box_title" = "Choose font family";
"lng_font_default" = "Default";
@@ -5615,6 +6002,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_search_tab_no_results_text" = "There were no results for \"{query}\".";
"lng_search_tab_no_results_retry" = "Try another hashtag.";
"lng_search_tab_by_hashtag" = "Enter a hashtag to find messages containing it.";
"lng_search_tab_try_in_all" = "Search in All Messages";
"lng_contact_details_button" = "View Contact";
"lng_contact_details_title" = "Contact details";

View File

@@ -28,6 +28,8 @@
<file alias="collectible_phone.tgs">../../animations/collectible_phone.tgs</file>
<file alias="search.tgs">../../animations/search.tgs</file>
<file alias="noresults.tgs">../../animations/noresults.tgs</file>
<file alias="hello_status.tgs">../../animations/hello_status.tgs</file>
<file alias="starref_link.tgs">../../animations/starref_link.tgs</file>
<file alias="dice_idle.tgs">../../animations/dice/dice_idle.tgs</file>
<file alias="dart_idle.tgs">../../animations/dice/dart_idle.tgs</file>

View File

@@ -4,9 +4,11 @@
<file alias="art/bg_thumbnail.png">../../art/bg_thumbnail.png</file>
<file alias="art/bg_initial.jpg">../../art/bg_initial.jpg</file>
<file alias="art/business_logo.png">../../art/business_logo.png</file>
<file alias="art/affiliate_logo.png">../../art/affiliate_logo.png</file>
<file alias="art/logo_256.png">../../art/logo_256.png</file>
<file alias="art/logo_256_no_margin.png">../../art/logo_256_no_margin.png</file>
<file alias="art/themeimage.jpg">../../art/themeimage.jpg</file>
<file alias="art/round_placeholder.jpg">../../art/round_placeholder.jpg</file>
<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>

View File

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

View File

@@ -44,8 +44,8 @@ IDI_ICON1 ICON "..\\art\\icon256.ico"
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 5,6,3,0
PRODUCTVERSION 5,6,3,0
FILEVERSION 5,10,2,0
PRODUCTVERSION 5,10,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", "5.6.3.0"
VALUE "LegalCopyright", "Copyright (C) 2014-2024"
VALUE "FileVersion", "5.10.2.0"
VALUE "LegalCopyright", "Copyright (C) 2014-2025"
VALUE "ProductName", "Telegram Desktop"
VALUE "ProductVersion", "5.6.3.0"
VALUE "ProductVersion", "5.10.2.0"
END
END
BLOCK "VarFileInfo"

View File

@@ -35,8 +35,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 5,6,3,0
PRODUCTVERSION 5,6,3,0
FILEVERSION 5,10,2,0
PRODUCTVERSION 5,10,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", "5.6.3.0"
VALUE "LegalCopyright", "Copyright (C) 2014-2024"
VALUE "FileVersion", "5.10.2.0"
VALUE "LegalCopyright", "Copyright (C) 2014-2025"
VALUE "ProductName", "Telegram Desktop"
VALUE "ProductVersion", "5.6.3.0"
VALUE "ProductVersion", "5.10.2.0"
END
END
BLOCK "VarFileInfo"

View File

@@ -7,11 +7,15 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#include "api/api_chat_filters.h"
#include "api/api_text_entities.h"
#include "apiwrap.h"
#include "base/event_filter.h"
#include "boxes/peer_list_box.h"
#include "boxes/premium_limits_box.h"
#include "boxes/filters/edit_filter_links.h" // FilterChatStatusText
#include "core/application.h"
#include "core/core_settings.h"
#include "core/ui_integration.h"
#include "data/data_channel.h"
#include "data/data_chat.h"
#include "data/data_chat_filters.h"
@@ -23,6 +27,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ui/boxes/confirm_box.h"
#include "ui/controls/filter_link_header.h"
#include "ui/text/text_utilities.h"
#include "ui/toast/toast.h"
#include "ui/widgets/buttons.h"
#include "ui/filter_icons.h"
#include "ui/vertical_list.h"
@@ -47,7 +52,7 @@ public:
ToggleChatsController(
not_null<Window::SessionController*> window,
ToggleAction action,
const QString &title,
Data::ChatFilterTitle title,
std::vector<not_null<PeerData*>> chats,
std::vector<not_null<PeerData*>> additional);
@@ -73,7 +78,6 @@ private:
Ui::RpWidget *_addedBottomWidget = nullptr;
ToggleAction _action = ToggleAction::Adding;
QString _filterTitle;
base::flat_set<not_null<PeerData*>> _checkable;
std::vector<not_null<PeerData*>> _chats;
std::vector<not_null<PeerData*>> _additional;
@@ -104,9 +108,9 @@ private:
[[nodiscard]] TextWithEntities AboutText(
Ui::FilterLinkHeaderType type,
const QString &title) {
TextWithEntities title) {
using Type = Ui::FilterLinkHeaderType;
auto boldTitle = Ui::Text::Bold(title);
auto boldTitle = Ui::Text::Wrapped(title, EntityType::Bold);
return (type == Type::AddingFilter)
? tr::lng_filters_by_link_sure(
tr::now,
@@ -136,22 +140,33 @@ void InitFilterLinkHeader(
not_null<PeerListBox*> box,
Fn<void(int minHeight, int maxHeight, int addedTopHeight)> adjust,
Ui::FilterLinkHeaderType type,
const QString &title,
const QString &iconEmoji,
rpl::producer<int> count) {
Data::ChatFilterTitle title,
QString iconEmoji,
rpl::producer<int> count,
bool horizontalFilters) {
const auto icon = Ui::LookupFilterIcon(
Ui::LookupFilterIconByEmoji(
iconEmoji
).value_or(Ui::FilterIcon::Custom)).active;
const auto isStatic = title.isStatic;
const auto makeContext = [=](Fn<void()> repaint) {
return Core::MarkedTextContext{
.session = &box->peerListUiShow()->session(),
.customEmojiRepaint = std::move(repaint),
.customEmojiLoopLimit = isStatic ? -1 : 0,
};
};
auto header = Ui::MakeFilterLinkHeader(box, {
.type = type,
.title = TitleText(type)(tr::now),
.about = AboutText(type, title),
.folderTitle = title,
.about = AboutText(type, title.text),
.makeAboutContext = makeContext,
.folderTitle = title.text,
.folderIcon = icon,
.badge = (type == Ui::FilterLinkHeaderType::AddingChats
? std::move(count)
: rpl::single(0)),
.horizontalFilters = horizontalFilters,
});
const auto widget = header.widget;
widget->resizeToWidth(st::boxWideWidth);
@@ -244,12 +259,11 @@ void ImportInvite(
ToggleChatsController::ToggleChatsController(
not_null<Window::SessionController*> window,
ToggleAction action,
const QString &title,
Data::ChatFilterTitle title,
std::vector<not_null<PeerData*>> chats,
std::vector<not_null<PeerData*>> additional)
: _window(window)
, _action(action)
, _filterTitle(title)
, _chats(std::move(chats))
, _additional(std::move(additional)) {
setStyleOverrides(&st::filterLinkChatsList);
@@ -525,7 +539,7 @@ void ShowImportError(
void ShowImportToast(
base::weak_ptr<Window::SessionController> weak,
const QString &title,
Data::ChatFilterTitle title,
Ui::FilterLinkHeaderType type,
int added) {
const auto strong = weak.get();
@@ -536,22 +550,55 @@ void ShowImportToast(
const auto phrase = created
? tr::lng_filters_added_title
: tr::lng_filters_updated_title;
auto text = Ui::Text::Bold(phrase(tr::now, lt_folder, title));
auto text = Ui::Text::Wrapped(
phrase(tr::now, lt_folder, title.text, Ui::Text::WithEntities),
EntityType::Bold);
if (added > 0) {
const auto phrase = created
? tr::lng_filters_added_also
: tr::lng_filters_updated_also;
text.append('\n').append(phrase(tr::now, lt_count, added));
}
strong->showToast(std::move(text));
const auto isStatic = title.isStatic;
const auto makeContext = [=](not_null<QWidget*> widget) {
return Core::MarkedTextContext{
.session = &strong->session(),
.customEmojiRepaint = [=] { widget->update(); },
.customEmojiLoopLimit = isStatic ? -1 : 0,
};
};
strong->showToast({
.text = std::move(text),
.textContext = makeContext,
});
}
void HandleEnterInBox(not_null<Ui::BoxContent*> box) {
const auto isEnter = [=](not_null<QEvent*> event) {
if (event->type() == QEvent::KeyPress) {
if (const auto k = static_cast<QKeyEvent*>(event.get())) {
return (k->key() == Qt::Key_Enter)
|| (k->key() == Qt::Key_Return);
}
}
return false;
};
base::install_event_filter(box, [=](not_null<QEvent*> event) {
if (isEnter(event)) {
box->triggerButton(0);
return base::EventFilterResult::Cancel;
}
return base::EventFilterResult::Continue;
});
}
void ProcessFilterInvite(
base::weak_ptr<Window::SessionController> weak,
const QString &slug,
FilterId filterId,
const QString &title,
const QString &iconEmoji,
Data::ChatFilterTitle title,
QString iconEmoji,
std::vector<not_null<PeerData*>> peers,
std::vector<not_null<PeerData*>> already) {
const auto strong = weak.get();
@@ -570,6 +617,8 @@ void ProcessFilterInvite(
title,
std::move(peers),
std::move(already));
const auto horizontalFilters = !strong->enoughSpaceForFilters()
|| Core::App().settings().chatFiltersHorizontal();
const auto raw = controller.get();
auto initBox = [=](not_null<PeerListBox*> box) {
box->setStyle(st::filterInviteBox);
@@ -586,14 +635,23 @@ void ProcessFilterInvite(
});
InitFilterLinkHeader(box, [=](int min, int max, int addedTop) {
raw->adjust(min, max, addedTop);
}, type, title, iconEmoji, rpl::duplicate(badge));
}, type, title, iconEmoji, rpl::duplicate(badge), horizontalFilters);
raw->setRealContentHeight(box->heightValue());
const auto isStatic = title.isStatic;
const auto makeContext = [=](Fn<void()> update) {
return Core::MarkedTextContext{
.session = &strong->session(),
.customEmojiRepaint = update,
.customEmojiLoopLimit = isStatic ? -1 : 0,
};
};
auto owned = Ui::FilterLinkProcessButton(
box,
type,
title,
title.text,
makeContext,
std::move(badge));
const auto button = owned.data();
@@ -608,6 +666,8 @@ void ProcessFilterInvite(
box->addButton(std::move(owned));
HandleEnterInBox(box);
struct State {
bool importing = false;
};
@@ -692,7 +752,7 @@ void CheckFilterInvite(
if (!strong) {
return;
}
auto title = QString();
auto title = Data::ChatFilterTitle();
auto iconEmoji = QString();
auto filterId = FilterId();
auto peers = std::vector<not_null<PeerData*>>();
@@ -711,7 +771,8 @@ void CheckFilterInvite(
return result;
};
result.match([&](const MTPDchatlists_chatlistInvite &data) {
title = qs(data.vtitle());
title.text = ParseTextWithEntities(session, data.vtitle());
title.isStatic = data.is_title_noanimate();
iconEmoji = data.vemoticon().value_or_empty();
peers = parseList(data.vpeers());
}, [&](const MTPDchatlists_chatlistInviteAlready &data) {
@@ -776,8 +837,8 @@ void ProcessFilterUpdate(
void ProcessFilterRemove(
base::weak_ptr<Window::SessionController> weak,
const QString &title,
const QString &iconEmoji,
Data::ChatFilterTitle title,
QString iconEmoji,
std::vector<not_null<PeerData*>> all,
std::vector<not_null<PeerData*>> suggest,
Fn<void(std::vector<not_null<PeerData*>>)> done) {
@@ -796,6 +857,8 @@ void ProcessFilterRemove(
title,
std::move(suggest),
std::move(all));
const auto horizontalFilters = !strong->enoughSpaceForFilters()
|| Core::App().settings().chatFiltersHorizontal();
const auto raw = controller.get();
auto initBox = [=](not_null<PeerListBox*> box) {
box->setStyle(st::filterInviteBox);
@@ -807,12 +870,21 @@ void ProcessFilterRemove(
});
InitFilterLinkHeader(box, [=](int min, int max, int addedTop) {
raw->adjust(min, max, addedTop);
}, type, title, iconEmoji, rpl::single(0));
}, type, title, iconEmoji, rpl::single(0), horizontalFilters);
const auto isStatic = title.isStatic;
const auto makeContext = [=](Fn<void()> update) {
return Core::MarkedTextContext{
.session = &strong->session(),
.customEmojiRepaint = update,
.customEmojiLoopLimit = isStatic ? -1 : 0,
};
};
auto owned = Ui::FilterLinkProcessButton(
box,
type,
title,
title.text,
makeContext,
std::move(badge));
const auto button = owned.data();
@@ -827,6 +899,8 @@ void ProcessFilterRemove(
box->addButton(std::move(owned));
HandleEnterInBox(box);
raw->selectedValue(
) | rpl::start_with_next([=](
base::flat_set<not_null<PeerData*>> &&peers) {

View File

@@ -17,6 +17,7 @@ class SessionController;
namespace Data {
class ChatFilter;
struct ChatFilterTitle;
} // namespace Data
namespace Api {
@@ -36,8 +37,8 @@ void ProcessFilterUpdate(
void ProcessFilterRemove(
base::weak_ptr<Window::SessionController> weak,
const QString &title,
const QString &iconEmoji,
Data::ChatFilterTitle title,
QString iconEmoji,
std::vector<not_null<PeerData*>> all,
std::vector<not_null<PeerData*>> suggest,
Fn<void(std::vector<not_null<PeerData*>>)> done);

View File

@@ -0,0 +1,128 @@
/*
This file is part of Telegram Desktop,
the official desktop application for the Telegram messaging service.
For license and copyright information please follow this link:
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#include "api/api_chat_filters_remove_manager.h"
#include "api/api_chat_filters.h"
#include "apiwrap.h"
#include "data/data_chat_filters.h"
#include "data/data_peer.h"
#include "data/data_session.h"
#include "lang/lang_keys.h"
#include "main/main_session.h"
#include "ui/boxes/confirm_box.h"
#include "ui/ui_utility.h"
#include "window/window_controller.h"
#include "window/window_session_controller.h"
#include "styles/style_layers.h"
namespace Api {
namespace {
void RemoveChatFilter(
not_null<Main::Session*> session,
FilterId filterId,
std::vector<not_null<PeerData*>> leave) {
const auto api = &session->api();
session->data().chatsFilters().apply(MTP_updateDialogFilter(
MTP_flags(MTPDupdateDialogFilter::Flag(0)),
MTP_int(filterId),
MTPDialogFilter()));
if (leave.empty()) {
api->request(MTPmessages_UpdateDialogFilter(
MTP_flags(MTPmessages_UpdateDialogFilter::Flag(0)),
MTP_int(filterId),
MTPDialogFilter()
)).send();
} else {
api->request(MTPchatlists_LeaveChatlist(
MTP_inputChatlistDialogFilter(MTP_int(filterId)),
MTP_vector<MTPInputPeer>(ranges::views::all(
leave
) | ranges::views::transform([](not_null<PeerData*> peer) {
return MTPInputPeer(peer->input);
}) | ranges::to<QVector<MTPInputPeer>>())
)).done([=](const MTPUpdates &result) {
api->applyUpdates(result);
}).send();
}
}
} // namespace
RemoveComplexChatFilter::RemoveComplexChatFilter() = default;
void RemoveComplexChatFilter::request(
QPointer<Ui::RpWidget> widget,
base::weak_ptr<Window::SessionController> weak,
FilterId id) {
const auto session = &weak->session();
const auto &list = session->data().chatsFilters().list();
const auto i = ranges::find(list, id, &Data::ChatFilter::id);
const auto filter = (i != end(list)) ? *i : Data::ChatFilter();
const auto has = filter.hasMyLinks();
const auto confirm = [=](Fn<void()> action, bool onlyWhenHas = false) {
if (!has && onlyWhenHas) {
action();
return;
}
weak->window().show(Ui::MakeConfirmBox({
.text = (has
? tr::lng_filters_delete_sure()
: tr::lng_filters_remove_sure()),
.confirmed = [=](Fn<void()> &&close) { close(); action(); },
.confirmText = (has
? tr::lng_box_delete()
: tr::lng_filters_remove_yes()),
.confirmStyle = &st::attentionBoxButton,
}));
};
const auto simple = [=] {
confirm([=] { RemoveChatFilter(session, id, {}); });
};
const auto suggestRemoving = Api::ExtractSuggestRemoving(filter);
if (suggestRemoving.empty()) {
simple();
return;
} else if (_removingRequestId) {
if (_removingId == id) {
return;
}
session->api().request(_removingRequestId).cancel();
}
_removingId = id;
_removingRequestId = session->api().request(
MTPchatlists_GetLeaveChatlistSuggestions(
MTP_inputChatlistDialogFilter(
MTP_int(id)))
).done(crl::guard(widget, [=, this](const MTPVector<MTPPeer> &result) {
_removingRequestId = 0;
const auto suggestRemovePeers = ranges::views::all(
result.v
) | ranges::views::transform([=](const MTPPeer &peer) {
return session->data().peer(peerFromMTP(peer));
}) | ranges::to_vector;
const auto chosen = crl::guard(widget, [=](
std::vector<not_null<PeerData*>> peers) {
RemoveChatFilter(session, id, std::move(peers));
});
confirm(crl::guard(widget, [=] {
Api::ProcessFilterRemove(
weak,
filter.title(),
filter.iconEmoji(),
suggestRemoving,
suggestRemovePeers,
chosen);
}), true);
})).fail(crl::guard(widget, [=, this] {
_removingRequestId = 0;
simple();
})).send();
}
} // namespace Api

View File

@@ -0,0 +1,35 @@
/*
This file is part of Telegram Desktop,
the official desktop application for the Telegram messaging service.
For license and copyright information please follow this link:
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#pragma once
namespace Window {
class SessionController;
} // namespace Window
namespace Ui {
class RpWidget;
} // namespace Ui
namespace Api {
class RemoveComplexChatFilter final {
public:
RemoveComplexChatFilter();
void request(
QPointer<Ui::RpWidget> widget,
base::weak_ptr<Window::SessionController> weak,
FilterId id);
private:
FilterId _removingId = 0;
mtpRequestId _removingRequestId = 0;
};
} // namespace Api

View File

@@ -8,6 +8,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "api/api_chat_invite.h"
#include "apiwrap.h"
#include "api/api_credits.h"
#include "boxes/premium_limits_box.h"
#include "core/application.h"
#include "data/components/credits.h"
@@ -25,6 +26,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "settings/settings_credits_graphics.h"
#include "ui/boxes/confirm_box.h"
#include "ui/controls/userpic_button.h"
#include "ui/effects/credits_graphics.h"
#include "ui/effects/premium_graphics.h"
#include "ui/effects/premium_stars_colored.h"
#include "ui/empty_userpic.h"
@@ -129,6 +131,7 @@ void ConfirmSubscriptionBox(
struct State final {
std::shared_ptr<Data::PhotoMedia> photoMedia;
std::unique_ptr<Ui::EmptyUserpic> photoEmpty;
QImage frame;
std::optional<MTP::Sender> api;
Ui::RpWidget* saveButton = nullptr;
@@ -146,25 +149,45 @@ void ConfirmSubscriptionBox(
const auto userpic = userpicWrap->entity();
const auto photoSize = st::confirmInvitePhotoSize;
userpic->resize(Size(photoSize));
const auto creditsIconSize = photoSize / 3;
const auto creditsIconCallback =
Ui::PaintOutlinedColoredCreditsIconCallback(
creditsIconSize,
1.5);
state->frame = QImage(
Size(photoSize * style::DevicePixelRatio()),
QImage::Format_ARGB32_Premultiplied);
state->frame.setDevicePixelRatio(style::DevicePixelRatio());
const auto options = Images::Option::RoundCircle;
userpic->paintRequest(
) | rpl::start_with_next([=, small = Data::PhotoSize::Small] {
auto p = QPainter(userpic);
if (state->photoMedia) {
if (const auto image = state->photoMedia->image(small)) {
p.drawPixmap(
state->frame.fill(Qt::transparent);
{
auto p = QPainter(&state->frame);
if (state->photoMedia) {
if (const auto image = state->photoMedia->image(small)) {
p.drawPixmap(
0,
0,
image->pix(Size(photoSize), { .options = options }));
}
} else if (state->photoEmpty) {
state->photoEmpty->paintCircle(
p,
0,
0,
image->pix(Size(photoSize), { .options = options }));
userpic->width(),
photoSize);
}
if (creditsIconCallback) {
p.translate(
photoSize - creditsIconSize,
photoSize - creditsIconSize);
creditsIconCallback(p);
}
} else if (state->photoEmpty) {
state->photoEmpty->paintCircle(
p,
0,
0,
userpic->width(),
photoSize);
}
auto p = QPainter(userpic);
p.drawImage(0, 0, state->frame);
}, userpicWrap->lifetime());
userpicWrap->setAttribute(Qt::WA_TransparentForMouseEvents);
if (photo) {
@@ -184,32 +207,12 @@ void ConfirmSubscriptionBox(
Ui::AddSkip(content);
Ui::AddSkip(content);
{
const auto widget = Ui::CreateChild<Ui::RpWidget>(content);
using ColoredMiniStars = Ui::Premium::ColoredMiniStars;
const auto stars = widget->lifetime().make_state<ColoredMiniStars>(
widget,
false,
Ui::Premium::MiniStars::Type::BiStars);
stars->setColorOverride(Ui::Premium::CreditsIconGradientStops());
widget->resize(
st::boxWideWidth - photoSize,
photoSize * 2);
content->sizeValue(
) | rpl::start_with_next([=](const QSize &size) {
widget->moveToLeft(photoSize / 2, 0);
const auto starsRect = Rect(widget->size());
stars->setPosition(starsRect.topLeft());
stars->setSize(starsRect.size());
widget->lower();
}, widget->lifetime());
widget->paintRequest(
) | rpl::start_with_next([=](const QRect &r) {
auto p = QPainter(widget);
p.fillRect(r, Qt::transparent);
stars->paint(p);
}, widget->lifetime());
}
Settings::AddMiniStars(
content,
Ui::CreateChild<Ui::RpWidget>(content),
photoSize,
box->width(),
2.);
box->addRow(
object_ptr<Ui::CenterWrap<Ui::FlatLabel>>(
@@ -273,20 +276,39 @@ void ConfirmSubscriptionBox(
const auto buttonWidth = state->saveButton
? state->saveButton->width()
: 0;
const auto finish = [=] {
state->api = std::nullopt;
state->loading.force_assign(false);
if (const auto strong = weak.data()) {
strong->closeBox();
}
};
state->api->request(
MTPpayments_SendStarsForm(
MTP_long(formId),
MTP_inputInvoiceChatInviteSubscription(MTP_string(hash)))
).done([=](const MTPpayments_PaymentResult &result) {
state->api = std::nullopt;
state->loading.force_assign(false);
result.match([&](const MTPDpayments_paymentResult &data) {
session->api().applyUpdates(data.vupdates());
}, [](const MTPDpayments_paymentVerificationNeeded &data) {
});
if (weak) {
box->closeBox();
const auto refill = session->data().activeCreditsSubsRebuilder();
const auto strong = weak.data();
if (!strong) {
return;
}
if (!refill) {
return finish();
}
const auto api
= strong->lifetime().make_state<Api::CreditsHistory>(
session->user(),
true,
true);
api->requestSubscriptions({}, [=](Data::CreditsStatusSlice d) {
refill->fire(std::move(d));
finish();
});
}).fail([=](const MTP::Error &error) {
const auto id = error.type();
if (weak) {

View File

@@ -7,6 +7,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#include "api/api_credits.h"
#include "api/api_premium.h"
#include "api/api_statistics_data_deserialize.h"
#include "api/api_updates.h"
#include "apiwrap.h"
@@ -39,8 +40,8 @@ constexpr auto kTransactionsLimit = 100;
if (const auto list = tl.data().vextended_media()) {
extended.reserve(list->v.size());
for (const auto &media : list->v) {
media.match([&](const MTPDmessageMediaPhoto &photo) {
if (const auto inner = photo.vphoto()) {
media.match([&](const MTPDmessageMediaPhoto &data) {
if (const auto inner = data.vphoto()) {
const auto photo = owner->processPhoto(*inner);
if (!photo->isNull()) {
extended.push_back(CreditsHistoryMedia{
@@ -49,9 +50,11 @@ constexpr auto kTransactionsLimit = 100;
});
}
}
}, [&](const MTPDmessageMediaDocument &document) {
if (const auto inner = document.vdocument()) {
const auto document = owner->processDocument(*inner);
}, [&](const MTPDmessageMediaDocument &data) {
if (const auto inner = data.vdocument()) {
const auto document = owner->processDocument(
*inner,
data.valt_documents());
if (document->isAnimation()
|| document->isVideoFile()
|| document->isGifv()) {
@@ -71,7 +74,27 @@ constexpr auto kTransactionsLimit = 100;
return PeerId(0);
}).value;
const auto stargift = tl.data().vstargift();
const auto incoming = (int64(tl.data().vstars().v) >= 0);
const auto nonUniqueGift = stargift
? stargift->match([&](const MTPDstarGift &data) {
return &data;
}, [](const auto &) { return (const MTPDstarGift*)nullptr; })
: nullptr;
const auto reaction = tl.data().is_reaction();
const auto amount = Data::FromTL(tl.data().vstars());
const auto starrefAmount = tl.data().vstarref_amount()
? Data::FromTL(*tl.data().vstarref_amount())
: StarsAmount();
const auto starrefCommission
= tl.data().vstarref_commission_permille().value_or_empty();
const auto starrefBarePeerId = tl.data().vstarref_peer()
? peerFromMTP(*tl.data().vstarref_peer()).value
: 0;
const auto incoming = (amount >= StarsAmount());
const auto saveActorId = (reaction || !extended.empty()) && incoming;
const auto parsedGift = stargift
? FromTL(&peer->session(), *stargift)
: std::optional<Data::StarGift>();
const auto giftStickerId = parsedGift ? parsedGift->document->id : 0;
return Data::CreditsHistoryEntry{
.id = qs(tl.data().vid()),
.title = qs(tl.data().vtitle().value_or_empty()),
@@ -79,14 +102,17 @@ constexpr auto kTransactionsLimit = 100;
.date = base::unixtime::parse(tl.data().vdate().v),
.photoId = photo ? photo->id : 0,
.extended = std::move(extended),
.credits = tl.data().vstars().v,
.credits = Data::FromTL(tl.data().vstars()),
.bareMsgId = uint64(tl.data().vmsg_id().value_or_empty()),
.barePeerId = barePeerId,
.barePeerId = saveActorId ? peer->id.value : barePeerId,
.bareGiveawayMsgId = uint64(
tl.data().vgiveaway_post_id().value_or_empty()),
.bareGiftStickerId = (stargift
? owner->processDocument(stargift->data().vsticker())->id
: 0),
.bareGiftStickerId = giftStickerId,
.bareActorId = saveActorId ? barePeerId : uint64(0),
.uniqueGift = parsedGift ? parsedGift->unique : nullptr,
.starrefAmount = starrefAmount,
.starrefCommission = starrefCommission,
.starrefRecipientId = starrefBarePeerId,
.peerType = tl.data().vpeer().match([](const HistoryPeerTL &) {
return Data::CreditsHistoryEntry::PeerType::Peer;
}, [](const MTPDstarsTransactionPeerPlayMarket &) {
@@ -101,6 +127,8 @@ constexpr auto kTransactionsLimit = 100;
return Data::CreditsHistoryEntry::PeerType::PremiumBot;
}, [](const MTPDstarsTransactionPeerAds &) {
return Data::CreditsHistoryEntry::PeerType::Ads;
}, [](const MTPDstarsTransactionPeerAPI &) {
return Data::CreditsHistoryEntry::PeerType::API;
}),
.subscriptionUntil = tl.data().vsubscription_period()
? base::unixtime::parse(base::unixtime::now()
@@ -110,10 +138,13 @@ constexpr auto kTransactionsLimit = 100;
? base::unixtime::parse(tl.data().vtransaction_date()->v)
: QDateTime(),
.successLink = qs(tl.data().vtransaction_url().value_or_empty()),
.convertStars = int(stargift
? stargift->data().vconvert_stars().v
.starsConverted = int(nonUniqueGift
? nonUniqueGift->vconvert_stars().v
: 0),
.floodSkip = int(tl.data().vfloodskip_number().value_or(0)),
.converted = stargift && incoming,
.stargift = stargift.has_value(),
.giftUpgraded = tl.data().is_stargift_upgrade(),
.reaction = tl.data().is_reaction(),
.refunded = tl.data().is_refund(),
.pending = tl.data().is_pending(),
@@ -124,17 +155,26 @@ constexpr auto kTransactionsLimit = 100;
}
[[nodiscard]] Data::SubscriptionEntry SubscriptionFromTL(
const MTPStarsSubscription &tl) {
const MTPStarsSubscription &tl,
not_null<PeerData*> peer) {
return Data::SubscriptionEntry{
.id = qs(tl.data().vid()),
.inviteHash = qs(tl.data().vchat_invite_hash().value_or_empty()),
.title = qs(tl.data().vtitle().value_or_empty()),
.slug = qs(tl.data().vinvoice_slug().value_or_empty()),
.until = base::unixtime::parse(tl.data().vuntil_date().v),
.subscription = Data::PeerSubscription{
.credits = tl.data().vpricing().data().vamount().v,
.period = tl.data().vpricing().data().vperiod().v,
},
.barePeerId = peerFromMTP(tl.data().vpeer()).value,
.photoId = (tl.data().vphoto()
? peer->owner().photoFromWeb(
*tl.data().vphoto(),
ImageLocation())->id
: 0),
.cancelled = tl.data().is_canceled(),
.cancelledByBot = tl.data().is_bot_canceled(),
.expired = (base::unixtime::now() > tl.data().vuntil_date().v),
.canRefulfill = tl.data().is_can_refulfill(),
};
@@ -157,16 +197,17 @@ constexpr auto kTransactionsLimit = 100;
if (const auto history = data.vsubscriptions()) {
subscriptions.reserve(history->v.size());
for (const auto &tl : history->v) {
subscriptions.push_back(SubscriptionFromTL(tl));
subscriptions.push_back(SubscriptionFromTL(tl, peer));
}
}
return Data::CreditsStatusSlice{
.list = std::move(entries),
.subscriptions = std::move(subscriptions),
.balance = status.data().vbalance().v,
.balance = Data::FromTL(status.data().vbalance()),
.subscriptionsMissingBalance
= status.data().vsubscriptions_missing_balance().value_or_empty(),
.allLoaded = !status.data().vnext_offset().has_value(),
.allLoaded = !status.data().vnext_offset().has_value()
&& !status.data().vsubscriptions_next_offset().has_value(),
.token = qs(status.data().vnext_offset().value_or_empty()),
.tokenSubscriptions = qs(
status.data().vsubscriptions_next_offset().value_or_empty()),
@@ -249,8 +290,8 @@ void CreditsStatus::request(
_peer->isSelf() ? MTP_inputPeerSelf() : _peer->input
)).done([=](const TLResult &result) {
_requestId = 0;
const auto balance = result.data().vbalance().v;
_peer->session().credits().apply(_peer->id, balance);
const auto &balance = result.data().vbalance();
_peer->session().credits().apply(_peer->id, Data::FromTL(balance));
if (const auto onstack = done) {
onstack(StatusFromTL(result, _peer));
}
@@ -329,7 +370,9 @@ rpl::producer<not_null<PeerData*>> PremiumPeerBot(
const auto api = lifetime.make_state<MTP::Sender>(&session->mtp());
api->request(MTPcontacts_ResolveUsername(
MTP_string(username)
MTP_flags(0),
MTP_string(username),
MTP_string()
)).done([=](const MTPcontacts_ResolvedPeer &result) {
session->data().processUsers(result.data().vusers());
session->data().processChats(result.data().vchats());
@@ -361,12 +404,13 @@ rpl::producer<rpl::no_value, QString> CreditsEarnStatistics::request() {
)).done([=](const MTPpayments_StarsRevenueStats &result) {
const auto &data = result.data();
const auto &status = data.vstatus().data();
using Data::FromTL;
_data = Data::CreditsEarnStatistics{
.revenueGraph = StatisticalGraphFromTL(
data.vrevenue_graph()),
.currentBalance = status.vcurrent_balance().v,
.availableBalance = status.vavailable_balance().v,
.overallRevenue = status.voverall_revenue().v,
.currentBalance = FromTL(status.vcurrent_balance()),
.availableBalance = FromTL(status.vavailable_balance()),
.overallRevenue = FromTL(status.voverall_revenue()),
.usdRate = data.vusd_rate().v,
.isWithdrawalEnabled = status.is_withdrawal_enabled(),
.nextWithdrawalAt = status.vnext_withdrawal_at()
@@ -453,4 +497,20 @@ Data::CreditsGiveawayOptions CreditsGiveawayOptions::options() const {
return _options;
}
void EditCreditsSubscription(
not_null<Main::Session*> session,
const QString &id,
bool cancel,
Fn<void()> done,
Fn<void(QString)> fail) {
using Flag = MTPpayments_ChangeStarsSubscription::Flag;
session->api().request(
MTPpayments_ChangeStarsSubscription(
MTP_flags(Flag::f_canceled),
MTP_inputPeerSelf(),
MTP_string(id),
MTP_bool(cancel)
)).done(done).fail([=](const MTP::Error &e) { fail(e.type()); }).send();
}
} // namespace Api

View File

@@ -99,8 +99,8 @@ public:
[[nodiscard]] Data::CreditsEarnStatistics data() const;
private:
const bool _isUser = false;
Data::CreditsEarnStatistics _data;
bool _isUser = false;
mtpRequestId _requestId = 0;
@@ -109,4 +109,11 @@ private:
[[nodiscard]] rpl::producer<not_null<PeerData*>> PremiumPeerBot(
not_null<Main::Session*> session);
void EditCreditsSubscription(
not_null<Main::Session*> session,
const QString &id,
bool cancel,
Fn<void()> done,
Fn<void(QString)> fail);
} // namespace Api

View File

@@ -40,6 +40,7 @@ void HandleWithdrawalButton(
std::shared_ptr<Ui::Show> show) {
Expects(receiver.currencyReceiver
|| (receiver.creditsReceiver && receiver.creditsAmount));
struct State {
rpl::lifetime lifetime;
bool loading = false;
@@ -58,8 +59,7 @@ void HandleWithdrawalButton(
const auto processOut = [=] {
if (state->loading) {
return;
}
if (peer && !receiver.creditsAmount()) {
} else if (peer && !receiver.creditsAmount()) {
return;
}
state->loading = true;
@@ -89,12 +89,15 @@ void HandleWithdrawalButton(
}
};
const auto fail = [=](const MTP::Error &error) {
show->showToast(error.type());
const auto message = error.type();
if (box && !box->handleCustomCheckError(message)) {
show->showToast(message);
}
};
if (channel) {
session->api().request(
MTPstats_GetBroadcastRevenueWithdrawalUrl(
channel->inputChannel,
channel->input,
result.result
)).done([=](const ChannelOutUrl &r) {
done(qs(r.data().vurl()));
@@ -134,7 +137,7 @@ void HandleWithdrawalButton(
if (channel) {
session->api().request(
MTPstats_GetBroadcastRevenueWithdrawalUrl(
channel->inputChannel,
channel->input,
MTP_inputCheckPasswordEmpty()
)).fail(fail).send();
} else if (peer) {

View File

@@ -74,12 +74,17 @@ const FoundMessages &MessagesSearchMerged::messages() const {
return _concatedFound;
}
const MessagesSearch::Request &MessagesSearchMerged::request() const {
return _request;
}
void MessagesSearchMerged::clear() {
_concatedFound = {};
_migratedFirstFound = {};
}
void MessagesSearchMerged::search(const Request &search) {
_request = search;
if (_migratedSearch) {
_waitingForTotal = true;
_migratedSearch->searchMessages(search);

View File

@@ -31,6 +31,7 @@ public:
void searchMore();
[[nodiscard]] const FoundMessages &messages() const;
[[nodiscard]] const Request &request() const;
[[nodiscard]] rpl::producer<> newFounds() const;
[[nodiscard]] rpl::producer<> nextFounds() const;
@@ -39,6 +40,7 @@ private:
void addFound(const FoundMessages &data);
MessagesSearch _apiSearch;
Request _request;
std::optional<MessagesSearch> _migratedSearch;
FoundMessages _migratedFirstFound;

View File

@@ -601,7 +601,7 @@ auto PremiumGiftCodeOptions::requestStarGifts()
_giftsHash = data.vhash().v;
const auto &list = data.vgifts().v;
const auto session = &_peer->session();
auto gifts = std::vector<StarGift>();
auto gifts = std::vector<Data::StarGift>();
gifts.reserve(list.size());
for (const auto &gift : list) {
if (auto parsed = FromTL(session, gift)) {
@@ -620,7 +620,8 @@ auto PremiumGiftCodeOptions::requestStarGifts()
};
}
const std::vector<StarGift> &PremiumGiftCodeOptions::starGifts() const {
auto PremiumGiftCodeOptions::starGifts() const
-> const std::vector<Data::StarGift> & {
return _gifts;
}
@@ -758,28 +759,77 @@ rpl::producer<DocumentData*> RandomHelloStickerValue(
}) | rpl::take(1) | rpl::map(random));
}
std::optional<StarGift> FromTL(
std::optional<Data::StarGift> FromTL(
not_null<Main::Session*> session,
const MTPstarGift &gift) {
const auto &data = gift.data();
const auto document = session->data().processDocument(
data.vsticker());
const auto remaining = data.vavailability_remains();
const auto total = data.vavailability_total();
if (!document->sticker()) {
return {};
}
return StarGift{
.id = uint64(data.vid().v),
.stars = int64(data.vstars().v),
.convertStars = int64(data.vconvert_stars().v),
.document = document,
.limitedLeft = remaining.value_or_empty(),
.limitedCount = total.value_or_empty(),
};
return gift.match([&](const MTPDstarGift &data) {
const auto document = session->data().processDocument(
data.vsticker());
const auto remaining = data.vavailability_remains();
const auto total = data.vavailability_total();
if (!document->sticker()) {
return std::optional<Data::StarGift>();
}
return std::optional<Data::StarGift>(Data::StarGift{
.id = uint64(data.vid().v),
.stars = int64(data.vstars().v),
.starsConverted = int64(data.vconvert_stars().v),
.starsToUpgrade = int64(data.vupgrade_stars().value_or_empty()),
.document = document,
.limitedLeft = remaining.value_or_empty(),
.limitedCount = total.value_or_empty(),
.firstSaleDate = data.vfirst_sale_date().value_or_empty(),
.lastSaleDate = data.vlast_sale_date().value_or_empty(),
.upgradable = data.vupgrade_stars().has_value(),
.birthday = data.is_birthday(),
});
}, [&](const MTPDstarGiftUnique &data) {
const auto total = data.vavailability_total().v;
auto model = std::optional<Data::UniqueGiftModel>();
auto pattern = std::optional<Data::UniqueGiftPattern>();
for (const auto &attribute : data.vattributes().v) {
attribute.match([&](const MTPDstarGiftAttributeModel &data) {
model = FromTL(session, data);
}, [&](const MTPDstarGiftAttributePattern &data) {
pattern = FromTL(session, data);
}, [&](const MTPDstarGiftAttributeBackdrop &data) {
}, [&](const MTPDstarGiftAttributeOriginalDetails &data) {
});
}
if (!model
|| !model->document->sticker()
|| !pattern
|| !pattern->document->sticker()) {
return std::optional<Data::StarGift>();
}
auto result = Data::StarGift{
.id = uint64(data.vid().v),
.unique = std::make_shared<Data::UniqueGift>(Data::UniqueGift{
.title = qs(data.vtitle()),
.ownerId = peerFromUser(UserId(data.vowner_id().v)),
.number = data.vnum().v,
.model = *model,
.pattern = *pattern,
}),
.document = model->document,
.limitedLeft = (total - data.vavailability_issued().v),
.limitedCount = total,
};
const auto unique = result.unique.get();
for (const auto &attribute : data.vattributes().v) {
attribute.match([&](const MTPDstarGiftAttributeModel &data) {
}, [&](const MTPDstarGiftAttributePattern &data) {
}, [&](const MTPDstarGiftAttributeBackdrop &data) {
unique->backdrop = FromTL(data);
}, [&](const MTPDstarGiftAttributeOriginalDetails &data) {
unique->originalDetails = FromTL(session, data);
});
}
return std::make_optional(result);
});
}
std::optional<UserStarGift> FromTL(
std::optional<Data::UserStarGift> FromTL(
not_null<UserData*> to,
const MTPuserStarGift &gift) {
const auto session = &to->session();
@@ -787,9 +837,12 @@ std::optional<UserStarGift> FromTL(
auto parsed = FromTL(session, data.vgift());
if (!parsed) {
return {};
} else if (const auto unique = parsed->unique.get()) {
unique->starsForTransfer = data.vtransfer_stars().value_or(-1);
unique->exportAt = data.vcan_export_at().value_or_empty();
}
return UserStarGift{
.gift = std::move(*parsed),
return Data::UserStarGift{
.info = std::move(*parsed),
.message = (data.vmessage()
? TextWithEntities{
.text = qs(data.vmessage()->data().vtext()),
@@ -798,16 +851,74 @@ std::optional<UserStarGift> FromTL(
data.vmessage()->data().ventities().v),
}
: TextWithEntities()),
.convertStars = int64(data.vconvert_stars().value_or_empty()),
.starsConverted = int64(data.vconvert_stars().value_or_empty()),
.starsUpgradedBySender = int64(
data.vupgrade_stars().value_or_empty()),
.fromId = (data.vfrom_id()
? peerFromUser(data.vfrom_id()->v)
: PeerId()),
.messageId = data.vmsg_id().value_or_empty(),
.date = data.vdate().v,
.upgradable = data.is_can_upgrade(),
.anonymous = data.is_name_hidden(),
.hidden = data.is_unsaved(),
.mine = to->isSelf(),
};
}
Data::UniqueGiftModel FromTL(
not_null<Main::Session*> session,
const MTPDstarGiftAttributeModel &data) {
auto result = Data::UniqueGiftModel{
.document = session->data().processDocument(data.vdocument()),
};
result.name = qs(data.vname());
result.rarityPermille = data.vrarity_permille().v;
return result;
}
Data::UniqueGiftPattern FromTL(
not_null<Main::Session*> session,
const MTPDstarGiftAttributePattern &data) {
auto result = Data::UniqueGiftPattern{
.document = session->data().processDocument(data.vdocument()),
};
result.document->overrideEmojiUsesTextColor(true);
result.name = qs(data.vname());
result.rarityPermille = data.vrarity_permille().v;
return result;
}
Data::UniqueGiftBackdrop FromTL(const MTPDstarGiftAttributeBackdrop &data) {
auto result = Data::UniqueGiftBackdrop();
result.name = qs(data.vname());
result.rarityPermille = data.vrarity_permille().v;
result.centerColor = Ui::ColorFromSerialized(
data.vcenter_color());
result.edgeColor = Ui::ColorFromSerialized(
data.vedge_color());
result.patternColor = Ui::ColorFromSerialized(
data.vpattern_color());
result.textColor = Ui::ColorFromSerialized(
data.vtext_color());
return result;
}
Data::UniqueGiftOriginalDetails FromTL(
not_null<Main::Session*> session,
const MTPDstarGiftAttributeOriginalDetails &data) {
auto result = Data::UniqueGiftOriginalDetails();
result.date = data.vdate().v;
result.senderId = data.vsender_id()
? peerFromUser(
UserId(data.vsender_id().value_or_empty()))
: PeerId();
result.recipientId = peerFromUser(
UserId(data.vrecipient_id().v));
result.message = data.vmessage()
? ParseTextWithEntities(session, *data.vmessage())
: TextWithEntities();
return result;
}
} // namespace Api

View File

@@ -8,6 +8,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#pragma once
#include "data/data_premium_subscription_option.h"
#include "data/data_star_gift.h"
#include "mtproto/sender.h"
class History;
@@ -73,27 +74,6 @@ struct GiftOptionData {
int months = 0;
};
struct StarGift {
uint64 id = 0;
int64 stars = 0;
int64 convertStars = 0;
not_null<DocumentData*> document;
int limitedLeft = 0;
int limitedCount = 0;
};
struct UserStarGift {
StarGift gift;
TextWithEntities message;
int64 convertStars = 0;
PeerId fromId = 0;
MsgId messageId = 0;
TimeId date = 0;
bool anonymous = false;
bool hidden = false;
bool mine = false;
};
class Premium final {
public:
explicit Premium(not_null<ApiWrap*> api);
@@ -216,7 +196,7 @@ public:
[[nodiscard]] bool giveawayGiftsPurchaseAvailable() const;
[[nodiscard]] rpl::producer<rpl::no_value, QString> requestStarGifts();
[[nodiscard]] const std::vector<StarGift> &starGifts() const;
[[nodiscard]] const std::vector<Data::StarGift> &starGifts() const;
private:
struct Token final {
@@ -246,7 +226,7 @@ private:
base::flat_map<Token, Store> _stores;
int32 _giftsHash = 0;
std::vector<StarGift> _gifts;
std::vector<Data::StarGift> _gifts;
MTP::Sender _api;
@@ -276,11 +256,23 @@ enum class RequirePremiumState {
[[nodiscard]] rpl::producer<DocumentData*> RandomHelloStickerValue(
not_null<Main::Session*> session);
[[nodiscard]] std::optional<StarGift> FromTL(
[[nodiscard]] std::optional<Data::StarGift> FromTL(
not_null<Main::Session*> session,
const MTPstarGift &gift);
[[nodiscard]] std::optional<UserStarGift> FromTL(
[[nodiscard]] std::optional<Data::UserStarGift> FromTL(
not_null<UserData*> to,
const MTPuserStarGift &gift);
[[nodiscard]] Data::UniqueGiftModel FromTL(
not_null<Main::Session*> session,
const MTPDstarGiftAttributeModel &data);
[[nodiscard]] Data::UniqueGiftPattern FromTL(
not_null<Main::Session*> session,
const MTPDstarGiftAttributePattern &data);
[[nodiscard]] Data::UniqueGiftBackdrop FromTL(
const MTPDstarGiftAttributeBackdrop &data);
[[nodiscard]] Data::UniqueGiftOriginalDetails FromTL(
not_null<Main::Session*> session,
const MTPDstarGiftAttributeOriginalDetails &data);
} // namespace Api

View File

@@ -40,29 +40,20 @@ MTPreportReason ReasonToTL(const Ui::ReportReason &reason) {
} // namespace
void SendReport(
void SendPhotoReport(
std::shared_ptr<Ui::Show> show,
not_null<PeerData*> peer,
Ui::ReportReason reason,
const QString &comment,
std::variant<v::null_t, not_null<PhotoData*>> data) {
auto done = [=] {
not_null<PhotoData*> photo) {
peer->session().api().request(MTPaccount_ReportProfilePhoto(
peer->input,
photo->mtpInput(),
ReasonToTL(reason),
MTP_string(comment)
)).done([=] {
show->showToast(tr::lng_report_thanks(tr::now));
};
v::match(data, [&](v::null_t) {
peer->session().api().request(MTPaccount_ReportPeer(
peer->input,
ReasonToTL(reason),
MTP_string(comment)
)).done(std::move(done)).send();
}, [&](not_null<PhotoData*> photo) {
peer->session().api().request(MTPaccount_ReportProfilePhoto(
peer->input,
photo->mtpInput(),
ReasonToTL(reason),
MTP_string(comment)
)).done(std::move(done)).send();
});
}).send();
}
auto CreateReportMessagesOrStoriesCallback(

View File

@@ -41,12 +41,12 @@ struct ReportResult final {
bool successful = false;
};
void SendReport(
void SendPhotoReport(
std::shared_ptr<Ui::Show> show,
not_null<PeerData*> peer,
Ui::ReportReason reason,
const QString &comment,
std::variant<v::null_t, not_null<PhotoData*>> data);
not_null<PhotoData*> photo);
[[nodiscard]] auto CreateReportMessagesOrStoriesCallback(
std::shared_ptr<Ui::Show> show,

View File

@@ -456,6 +456,7 @@ void SendConfirmedFile(
not_null<Main::Session*> session,
const std::shared_ptr<FilePrepareResult> &file) {
const auto isEditing = (file->type != SendMediaType::Audio)
&& (file->type != SendMediaType::Round)
&& (file->to.replaceMediaOf != 0);
const auto newId = FullMsgId(
file->to.peer,
@@ -525,7 +526,8 @@ void SendConfirmedFile(
// Shortcut messages have no 'edited' badge.
flags |= MessageFlag::HideEdited;
}
if (file->type == SendMediaType::Audio) {
if (file->type == SendMediaType::Audio
|| file->type == SendMediaType::Round) {
if (!peer->isChannel() || peer->isMegagroup()) {
flags |= MessageFlag::MediaIsUnread;
}
@@ -551,29 +553,25 @@ void SendConfirmedFile(
MTPint());
} else if (file->type == SendMediaType::Audio) {
const auto ttlSeconds = file->to.options.ttlSeconds;
const auto isVoice = [&] {
return file->document.match([](const MTPDdocumentEmpty &d) {
return false;
}, [](const MTPDdocument &d) {
return ranges::any_of(d.vattributes().v, [&](
const MTPDocumentAttribute &attribute) {
using Att = MTPDdocumentAttributeAudio;
return attribute.match([](const Att &data) -> bool {
return data.vflags().v & Att::Flag::f_voice;
}, [](const auto &) {
return false;
});
});
});
}();
using Flag = MTPDmessageMediaDocument::Flag;
return MTP_messageMediaDocument(
MTP_flags(Flag::f_document
| (isVoice ? Flag::f_voice : Flag())
| Flag::f_voice
| (ttlSeconds ? Flag::f_ttl_seconds : Flag())),
file->document,
MTPVector<MTPDocument>(), // alt_documents
MTP_int(ttlSeconds));
} else if (file->type == SendMediaType::Round) {
using Flag = MTPDmessageMediaDocument::Flag;
const auto ttlSeconds = file->to.options.ttlSeconds;
return MTP_messageMediaDocument(
MTP_flags(Flag::f_document
| Flag::f_round
| (ttlSeconds ? Flag::f_ttl_seconds : Flag())
| (file->spoiler ? Flag::f_spoiler : Flag())),
file->document,
MTPVector<MTPDocument>(), // alt_documents
MTP_int(ttlSeconds));
} else {
Unexpected("Type in sendFilesConfirmed.");
}

View File

@@ -181,7 +181,9 @@ std::optional<HistoryItem*> SingleMessageSearch::performLookupByUsername(
ready();
};
_requestId = _session->api().request(MTPcontacts_ResolveUsername(
MTP_string(username)
MTP_flags(0),
MTP_string(username),
MTP_string()
)).done([=](const MTPcontacts_ResolvedPeer &result) {
result.match([&](const MTPDcontacts_resolvedPeer &data) {
_session->data().processUsers(data.vusers());

View File

@@ -14,6 +14,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "data/data_session.h"
#include "data/data_stories.h"
#include "data/data_story.h"
#include "data/data_user.h"
#include "history/history.h"
#include "main/main_session.h"
@@ -341,6 +342,10 @@ void PublicForwards::request(
.token = nextToken,
});
};
const auto processFail = [=] {
_requestId = 0;
done({});
};
constexpr auto kLimit = tl::make_int(100);
if (_fullId.messageId) {
@@ -349,14 +354,14 @@ void PublicForwards::request(
MTP_int(_fullId.messageId.msg),
MTP_string(token),
kLimit
)).done(processResult).fail([=] { _requestId = 0; }).send();
)).done(processResult).fail(processFail).send();
} else if (_fullId.storyId) {
_requestId = makeRequest(MTPstats_GetStoryPublicForwards(
channel->input,
MTP_int(_fullId.storyId.story),
MTP_string(token),
kLimit
)).done(processResult).fail([=] { _requestId = 0; }).send();
)).done(processResult).fail(processFail).send();
}
}
@@ -381,7 +386,7 @@ Data::PublicForwardsSlice MessageStatistics::firstSlice() const {
}
void MessageStatistics::request(Fn<void(Data::MessageStatistics)> done) {
if (channel()->isMegagroup()) {
if (channel()->isMegagroup() && !_storyId) {
return;
}
const auto requestFirstPublicForwards = [=](
@@ -681,17 +686,18 @@ Data::BoostStatus Boosts::boostStatus() const {
return _boostStatus;
}
ChannelEarnStatistics::ChannelEarnStatistics(not_null<ChannelData*> channel)
: StatisticsRequestSender(channel) {
EarnStatistics::EarnStatistics(not_null<PeerData*> peer)
: StatisticsRequestSender(peer)
, _isUser(peer->isUser()) {
}
rpl::producer<rpl::no_value, QString> ChannelEarnStatistics::request() {
rpl::producer<rpl::no_value, QString> EarnStatistics::request() {
return [=](auto consumer) {
auto lifetime = rpl::lifetime();
makeRequest(MTPstats_GetBroadcastRevenueStats(
MTP_flags(0),
channel()->inputChannel
(_isUser ? user()->input : channel()->input)
)).done([=](const MTPstats_BroadcastRevenueStats &result) {
const auto &data = result.data();
const auto &balances = data.vbalances().data();
@@ -708,18 +714,22 @@ rpl::producer<rpl::no_value, QString> ChannelEarnStatistics::request() {
requestHistory({}, [=](Data::EarnHistorySlice &&slice) {
_data.firstHistorySlice = std::move(slice);
api().request(
MTPchannels_GetFullChannel(channel()->inputChannel)
).done([=](const MTPmessages_ChatFull &result) {
result.data().vfull_chat().match([&](
const MTPDchannelFull &d) {
_data.switchedOff = d.is_restricted_sponsored();
}, [](const auto &) {
});
if (!_isUser) {
api().request(
MTPchannels_GetFullChannel(channel()->inputChannel)
).done([=](const MTPmessages_ChatFull &result) {
result.data().vfull_chat().match([&](
const MTPDchannelFull &d) {
_data.switchedOff = d.is_restricted_sponsored();
}, [](const auto &) {
});
consumer.put_done();
}).fail([=](const MTP::Error &error) {
consumer.put_error_copy(error.type());
}).send();
} else {
consumer.put_done();
}).fail([=](const MTP::Error &error) {
consumer.put_error_copy(error.type());
}).send();
}
});
}).fail([=](const MTP::Error &error) {
consumer.put_error_copy(error.type());
@@ -729,7 +739,7 @@ rpl::producer<rpl::no_value, QString> ChannelEarnStatistics::request() {
};
}
void ChannelEarnStatistics::requestHistory(
void EarnStatistics::requestHistory(
const Data::EarnHistorySlice::OffsetToken &token,
Fn<void(Data::EarnHistorySlice)> done) {
if (_requestId) {
@@ -738,7 +748,7 @@ void ChannelEarnStatistics::requestHistory(
constexpr auto kTlFirstSlice = tl::make_int(kFirstSlice);
constexpr auto kTlLimit = tl::make_int(kLimit);
_requestId = api().request(MTPstats_GetBroadcastRevenueTransactions(
channel()->inputChannel,
(_isUser ? user()->input : channel()->input),
MTP_int(token),
(!token) ? kTlFirstSlice : kTlLimit
)).done([=](const MTPstats_BroadcastRevenueTransactions &result) {
@@ -799,7 +809,7 @@ void ChannelEarnStatistics::requestHistory(
}).send();
}
Data::EarnStatistics ChannelEarnStatistics::data() const {
Data::EarnStatistics EarnStatistics::data() const {
return _data;
}

View File

@@ -79,9 +79,9 @@ private:
};
class ChannelEarnStatistics final : public StatisticsRequestSender {
class EarnStatistics final : public StatisticsRequestSender {
public:
explicit ChannelEarnStatistics(not_null<ChannelData*> channel);
explicit EarnStatistics(not_null<PeerData*> peer);
[[nodiscard]] rpl::producer<rpl::no_value, QString> request();
void requestHistory(
@@ -94,6 +94,7 @@ public:
static constexpr auto kLimit = int(10);
private:
const bool _isUser = false;
Data::EarnStatistics _data;
mtpRequestId _requestId = 0;

View File

@@ -229,7 +229,7 @@ EntitiesInText EntitiesFromMTP(
}
MTPVector<MTPMessageEntity> EntitiesToMTP(
not_null<Main::Session*> session,
Main::Session *session,
const EntitiesInText &entities,
ConvertOption option) {
auto v = QVector<MTPMessageEntity>();
@@ -283,6 +283,7 @@ MTPVector<MTPMessageEntity> EntitiesToMTP(
v.push_back(MTP_messageEntityMention(offset, length));
} break;
case EntityType::MentionName: {
Assert(session != nullptr);
const auto valid = MentionNameEntity(
session,
offset,
@@ -344,4 +345,14 @@ MTPVector<MTPMessageEntity> EntitiesToMTP(
return MTP_vector<MTPMessageEntity>(std::move(v));
}
TextWithEntities ParseTextWithEntities(
Main::Session *session,
const MTPTextWithEntities &text) {
const auto &data = text.data();
return {
.text = qs(data.vtext()),
.entities = EntitiesFromMTP(session, data.ventities().v),
};
}
} // namespace Api

View File

@@ -25,8 +25,12 @@ enum class ConvertOption {
const QVector<MTPMessageEntity> &entities);
[[nodiscard]] MTPVector<MTPMessageEntity> EntitiesToMTP(
not_null<Main::Session*> session,
Main::Session *session,
const EntitiesInText &entities,
ConvertOption option = ConvertOption::WithLocal);
[[nodiscard]] TextWithEntities ParseTextWithEntities(
Main::Session *session,
const MTPTextWithEntities &text);
} // namespace Api

View File

@@ -316,6 +316,9 @@ void Updates::feedUpdateVector(
} else if (policy == SkipUpdatePolicy::SkipExceptGroupCallParticipants) {
return;
}
if (policy == SkipUpdatePolicy::SkipNone) {
applyConvertToScheduledOnSend(updates);
}
for (const auto &entry : std::as_const(list)) {
const auto type = entry.type();
if ((policy == SkipUpdatePolicy::SkipMessageIds
@@ -329,6 +332,15 @@ void Updates::feedUpdateVector(
session().data().sendHistoryChangeNotifications();
}
void Updates::checkForSentToScheduled(const MTPUpdates &updates) {
updates.match([&](const MTPDupdates &data) {
applyConvertToScheduledOnSend(data.vupdates(), true);
}, [&](const MTPDupdatesCombined &data) {
applyConvertToScheduledOnSend(data.vupdates(), true);
}, [](const auto &) {
});
}
void Updates::feedMessageIds(const MTPVector<MTPUpdate> &updates) {
for (const auto &update : updates.v) {
if (update.type() == mtpc_updateMessageID) {
@@ -432,6 +444,7 @@ void Updates::feedChannelDifference(
session().data().processChats(data.vchats());
_handlingChannelDifference = true;
applyConvertToScheduledOnSend(data.vother_updates());
feedMessageIds(data.vother_updates());
session().data().processMessages(
data.vnew_messages(),
@@ -596,6 +609,7 @@ void Updates::feedDifference(
Core::App().checkAutoLock();
session().data().processUsers(users);
session().data().processChats(chats);
applyConvertToScheduledOnSend(other);
feedMessageIds(other);
session().data().processMessages(msgs, NewMessageType::Unread);
feedUpdateVector(other, SkipUpdatePolicy::SkipMessageIds);
@@ -881,6 +895,51 @@ void Updates::mtpUpdateReceived(const MTPUpdates &updates) {
}
}
void Updates::applyConvertToScheduledOnSend(
const MTPVector<MTPUpdate> &other,
bool skipScheduledCheck) {
for (const auto &update : other.v) {
update.match([&](const MTPDupdateNewScheduledMessage &data) {
const auto &message = data.vmessage();
const auto id = IdFromMessage(message);
const auto scheduledMessages = &_session->scheduledMessages();
const auto scheduledId = scheduledMessages->localMessageId(id);
for (const auto &updateId : other.v) {
updateId.match([&](const MTPDupdateMessageID &dataId) {
if (dataId.vid().v == id) {
auto &owner = session().data();
if (skipScheduledCheck) {
const auto peerId = PeerFromMessage(message);
const auto history = owner.historyLoaded(peerId);
if (history) {
_session->data().sentToScheduled({
.history = history,
.scheduledId = scheduledId,
});
}
return;
}
const auto rand = dataId.vrandom_id().v;
const auto localId = owner.messageIdByRandomId(rand);
if (const auto local = owner.message(localId)) {
if (!local->isScheduled()) {
_session->data().sentToScheduled({
.history = local->history(),
.scheduledId = scheduledId,
});
// We've sent a non-scheduled message,
// but it was converted to a scheduled.
local->destroy();
}
}
}
}, [](const auto &) {});
}
}, [](const auto &) {});
}
}
void Updates::applyGroupCallParticipantUpdates(const MTPUpdates &updates) {
updates.match([&](const MTPDupdates &data) {
session().data().processUsers(data.vusers());
@@ -1159,7 +1218,8 @@ void Updates::applyUpdatesNoPtsCheck(const MTPUpdates &updates) {
MTP_int(d.vttl_period().value_or_empty()),
MTPint(), // quick_reply_shortcut_id
MTPlong(), // effect
MTPFactCheck()),
MTPFactCheck(),
MTPint()), // report_delivery_until_date
MessageFlags(),
NewMessageType::Unread);
} break;
@@ -1196,7 +1256,8 @@ void Updates::applyUpdatesNoPtsCheck(const MTPUpdates &updates) {
MTP_int(d.vttl_period().value_or_empty()),
MTPint(), // quick_reply_shortcut_id
MTPlong(), // effect
MTPFactCheck()),
MTPFactCheck(),
MTPint()), // report_delivery_until_date
MessageFlags(),
NewMessageType::Unread);
} break;

View File

@@ -40,6 +40,8 @@ public:
void applyUpdatesNoPtsCheck(const MTPUpdates &updates);
void applyUpdateNoPtsCheck(const MTPUpdate &update);
void checkForSentToScheduled(const MTPUpdates &updates);
[[nodiscard]] int32 pts() const;
void updateOnline(crl::time lastNonIdleTime = 0);
@@ -131,6 +133,9 @@ private:
// Doesn't call sendHistoryChangeNotifications itself.
void feedUpdate(const MTPUpdate &update);
void applyConvertToScheduledOnSend(
const MTPVector<MTPUpdate> &other,
bool skipScheduledCheck = false);
void applyGroupCallParticipantUpdates(const MTPUpdates &updates);
bool whenGetDiffChanged(

View File

@@ -69,6 +69,9 @@ TLInputRules RulesToTL(const UserPrivacy::Rule &rule) {
if (rule.always.premiums && (rule.option != Option::Everyone)) {
result.push_back(MTP_inputPrivacyValueAllowPremium());
}
if (rule.always.miniapps && (rule.option != Option::Everyone)) {
result.push_back(MTP_inputPrivacyValueAllowBots());
}
}
if (!rule.ignoreNever) {
const auto users = collectInputUsers(rule.never);
@@ -83,6 +86,9 @@ TLInputRules RulesToTL(const UserPrivacy::Rule &rule) {
MTP_inputPrivacyValueDisallowChatParticipants(
MTP_vector<MTPlong>(chats)));
}
if (rule.never.miniapps && (rule.option != Option::Nobody)) {
result.push_back(MTP_inputPrivacyValueDisallowBots());
}
}
result.push_back([&] {
switch (rule.option) {
@@ -124,6 +130,10 @@ UserPrivacy::Rule TLToRules(const TLRules &rules, Data::Session &owner) {
setOption(Option::CloseFriends);
}, [&](const MTPDprivacyValueAllowPremium &) {
result.always.premiums = true;
}, [&](const MTPDprivacyValueAllowBots &) {
result.always.miniapps = true;
}, [&](const MTPDprivacyValueDisallowBots &) {
result.never.miniapps = true;
}, [&](const MTPDprivacyValueAllowUsers &data) {
const auto &users = data.vusers().v;
always.reserve(always.size() + users.size());
@@ -199,6 +209,7 @@ MTPInputPrivacyKey KeyToTL(UserPrivacy::Key key) {
case Key::Voices: return MTP_inputPrivacyKeyVoiceMessages();
case Key::About: return MTP_inputPrivacyKeyAbout();
case Key::Birthday: return MTP_inputPrivacyKeyBirthday();
case Key::GiftsAutoSave: return MTP_inputPrivacyKeyStarGiftsAutoSave();
}
Unexpected("Key in Api::UserPrivacy::KetToTL.");
}
@@ -228,6 +239,8 @@ std::optional<UserPrivacy::Key> TLToKey(mtpTypeId type) {
case mtpc_inputPrivacyKeyAbout: return Key::About;
case mtpc_privacyKeyBirthday:
case mtpc_inputPrivacyKeyBirthday: return Key::Birthday;
case mtpc_privacyKeyStarGiftsAutoSave:
case mtpc_inputPrivacyKeyStarGiftsAutoSave: return Key::GiftsAutoSave;
}
return std::nullopt;
}

View File

@@ -31,6 +31,7 @@ public:
Voices,
About,
Birthday,
GiftsAutoSave,
};
enum class Option {
Everyone,
@@ -41,6 +42,7 @@ public:
struct Exceptions {
std::vector<not_null<PeerData*>> peers;
bool premiums = false;
bool miniapps = false;
};
struct Rule {
Option option = Option::Everyone;

View File

@@ -757,4 +757,31 @@ rpl::producer<Ui::WhoReadContent> WhoReacted(
return WhoReacted(item, reaction, context, st, nullptr);
}
[[nodiscard]] rpl::producer<Ui::WhoReadContent> WhenDate(
not_null<PeerData*> author,
TimeId date,
Ui::WhoReadType type) {
return rpl::single(Ui::WhoReadContent{
.participants = { Ui::WhoReadParticipant{
.name = author->name(),
.date = FormatReadDate(date, QDateTime::currentDateTime()),
.id = author->id.value,
} },
.type = type,
.fullReadCount = 1,
});
}
rpl::producer<Ui::WhoReadContent> WhenEdited(
not_null<PeerData*> author,
TimeId date) {
return WhenDate(author, date, Ui::WhoReadType::Edited);
}
rpl::producer<Ui::WhoReadContent> WhenOriginal(
not_null<PeerData*> author,
TimeId date) {
return WhenDate(author, date, Ui::WhoReadType::Original);
}
} // namespace Api

View File

@@ -61,5 +61,11 @@ struct WhoReadList {
const Data::ReactionId &reaction,
not_null<QWidget*> context, // Cache results for this lifetime.
const style::WhoRead &st);
[[nodiscard]] rpl::producer<Ui::WhoReadContent> WhenEdited(
not_null<PeerData*> author,
TimeId date);
[[nodiscard]] rpl::producer<Ui::WhoReadContent> WhenOriginal(
not_null<PeerData*> author,
TimeId date);
} // namespace Api

View File

@@ -559,6 +559,14 @@ void ApiWrap::sendMessageFail(
: tr::lng_error_noforwards_group(tr::now), kJoinErrorDuration);
} else if (error == u"PREMIUM_ACCOUNT_REQUIRED"_q) {
Settings::ShowPremium(&session(), "premium_stickers");
} else if (error == u"SCHEDULE_TOO_MUCH"_q) {
auto &scheduled = _session->scheduledMessages();
if (const auto item = scheduled.lookupItem(peer->id, itemId.msg)) {
scheduled.removeSending(item);
}
if (show) {
show->showToast(tr::lng_error_schedule_limit(tr::now));
}
}
if (const auto item = _session->data().message(itemId)) {
Assert(randomId != 0);
@@ -708,7 +716,8 @@ void ApiWrap::finalizeMessageDataRequest(
QString ApiWrap::exportDirectMessageLink(
not_null<HistoryItem*> item,
bool inRepliesContext) {
bool inRepliesContext,
bool forceNonPublicLink) {
Expects(item->history()->peer->isChannel());
const auto itemId = item->fullId();
@@ -731,7 +740,7 @@ QString ApiWrap::exportDirectMessageLink(
const auto sender = root
? root->discussionPostOriginalSender()
: nullptr;
if (sender && sender->hasUsername()) {
if (sender && sender->hasUsername() && !forceNonPublicLink) {
// Comment to a public channel.
const auto forwarded = root->Get<HistoryMessageForwarded>();
linkItemId = forwarded->savedFromMsgId;
@@ -747,7 +756,7 @@ QString ApiWrap::exportDirectMessageLink(
}
}
}
const auto base = linkChannel->hasUsername()
const auto base = (linkChannel->hasUsername() && !forceNonPublicLink)
? linkChannel->username()
: "c/" + QString::number(peerToChannel(linkChannel->id).bare);
const auto post = QString::number(linkItemId.bare);
@@ -761,6 +770,7 @@ QString ApiWrap::exportDirectMessageLink(
? (QString::number(linkThreadId.bare) + '/' + post)
: post);
if (linkChannel->hasUsername()
&& !forceNonPublicLink
&& !linkChannel->isMegagroup()
&& !linkCommentId
&& !linkThreadId) {
@@ -774,6 +784,9 @@ QString ApiWrap::exportDirectMessageLink(
}
return session().createInternalLinkFull(query);
};
if (forceNonPublicLink) {
return fallback();
}
const auto i = _unlikelyMessageLinks.find(itemId);
const auto current = (i != end(_unlikelyMessageLinks))
? i->second
@@ -3206,6 +3219,31 @@ void ApiWrap::sharedMediaDone(
}
}
mtpRequestId ApiWrap::requestGlobalMedia(
Storage::SharedMediaType type,
const QString &query,
int32 offsetRate,
Data::MessagePosition offsetPosition,
Fn<void(Api::GlobalMediaResult)> done) {
auto prepared = Api::PrepareGlobalMediaRequest(
_session,
offsetRate,
offsetPosition,
type,
query);
if (!prepared) {
done({});
return 0;
}
return request(
std::move(*prepared)
).done([=](const Api::SearchRequestResult &result) {
done(Api::ParseGlobalMediaResult(_session, result));
}).fail([=] {
done({});
}).send();
}
void ApiWrap::sendAction(const SendAction &action) {
if (!action.options.scheduled
&& !action.options.shortcutId
@@ -3229,13 +3267,13 @@ void ApiWrap::finishForwarding(const SendAction &action) {
const auto topicRootId = action.replyTo.topicRootId;
auto toForward = history->resolveForwardDraft(topicRootId);
if (!toForward.items.empty()) {
const auto error = GetErrorTextForSending(
const auto error = GetErrorForSending(
history->peer,
{
.topicRootId = topicRootId,
.forward = &toForward.items,
});
if (!error.isEmpty()) {
if (error) {
return;
}
@@ -3329,6 +3367,7 @@ void ApiWrap::forwardMessages(
}
const auto requestType = Data::Histories::RequestType::Send;
const auto idsCopy = localIds;
const auto scheduled = action.options.scheduled;
histories.sendRequest(history, requestType, [=](Fn<void()> finish) {
history->sendRequestId = request(MTPmessages_ForwardMessages(
MTP_flags(sendFlags),
@@ -3341,6 +3380,9 @@ void ApiWrap::forwardMessages(
(sendAs ? sendAs->input : MTP_inputPeerEmpty()),
Data::ShortcutIdToMTP(_session, action.options.shortcutId)
)).done([=](const MTPUpdates &result) {
if (!scheduled) {
this->updates().checkForSentToScheduled(result);
}
applyUpdates(result);
if (shared && !--shared->requestsLeft) {
shared->callback();
@@ -3502,6 +3544,7 @@ void ApiWrap::sendVoiceMessage(
QByteArray result,
VoiceWaveform waveform,
crl::time duration,
bool video,
const SendAction &action) {
const auto caption = TextWithTags();
const auto to = FileLoadTaskOptions(action);
@@ -3510,6 +3553,7 @@ void ApiWrap::sendVoiceMessage(
result,
duration,
waveform,
video,
to,
caption));
}
@@ -3936,7 +3980,8 @@ void ApiWrap::sendInlineResult(
not_null<UserData*> bot,
not_null<InlineBots::Result*> data,
const SendAction &action,
std::optional<MsgId> localMessageId) {
std::optional<MsgId> localMessageId,
Fn<void(bool)> done) {
sendAction(action);
const auto history = action.history;
@@ -4016,11 +4061,17 @@ void ApiWrap::sendInlineResult(
history->finishSavingCloudDraft(
topicRootId,
UnixtimeFromMsgId(response.outerMsgId));
if (done) {
done(true);
}
}, [=](const MTP::Error &error, const MTP::Response &response) {
sendMessageFail(error, peer, randomId, newId);
history->finishSavingCloudDraft(
topicRootId,
UnixtimeFromMsgId(response.outerMsgId));
if (done) {
done(false);
}
});
finishForwarding(action);
}
@@ -4225,6 +4276,7 @@ void ApiWrap::sendMultiPaidMedia(
auto &histories = history->owner().histories();
const auto peer = history->peer;
const auto itemId = item->fullId();
album->sent = true;
histories.sendPreparedMessage(
history,
replyTo,
@@ -4296,6 +4348,9 @@ void ApiWrap::sendAlbumWithCancelled(
}
void ApiWrap::sendAlbumIfReady(not_null<SendingAlbum*> album) {
if (album->sent) {
return;
}
const auto groupId = album->groupId;
if (album->items.empty()) {
_sendingAlbums.remove(groupId);
@@ -4320,6 +4375,7 @@ void ApiWrap::sendAlbumIfReady(not_null<SendingAlbum*> album) {
return;
} else if (medias.size() < 2) {
const auto &single = medias.front().data();
album->sent = true;
sendMediaWithRandomId(
sample,
single.vmedia(),
@@ -4346,6 +4402,7 @@ void ApiWrap::sendAlbumIfReady(not_null<SendingAlbum*> album) {
| (album->options.invertCaption ? Flag::f_invert_media : Flag(0));
auto &histories = history->owner().histories();
const auto peer = history->peer;
album->sent = true;
histories.sendPreparedMessage(
history,
replyTo,

View File

@@ -59,6 +59,7 @@ class Show;
namespace Api {
struct SearchResult;
struct GlobalMediaResult;
class Updates;
class Authorizations;
@@ -164,7 +165,8 @@ public:
void requestMessageData(PeerData *peer, MsgId msgId, Fn<void()> done);
QString exportDirectMessageLink(
not_null<HistoryItem*> item,
bool inRepliesContext);
bool inRepliesContext,
bool forceNonPublicLink = false);
QString exportDirectStoryLink(not_null<Data::Story*> item);
void requestContacts();
@@ -287,6 +289,12 @@ public:
Storage::SharedMediaType type,
MsgId messageId,
SliceType slice);
mtpRequestId requestGlobalMedia(
Storage::SharedMediaType type,
const QString &query,
int32 offsetRate,
Data::MessagePosition offsetPosition,
Fn<void(Api::GlobalMediaResult)> done);
void readFeaturedSetDelayed(uint64 setId);
@@ -317,6 +325,7 @@ public:
QByteArray result,
VoiceWaveform waveform,
crl::time duration,
bool video,
const SendAction &action);
void sendFiles(
Ui::PreparedList &&list,
@@ -359,7 +368,8 @@ public:
not_null<UserData*> bot,
not_null<InlineBots::Result*> data,
const SendAction &action,
std::optional<MsgId> localMessageId);
std::optional<MsgId> localMessageId,
Fn<void(bool)> done = nullptr);
void sendMessageFail(
const MTP::Error &error,
not_null<PeerData*> peer,
@@ -506,6 +516,10 @@ private:
MsgId topicRootId,
SharedMediaType type,
Api::SearchResult &&parsed);
void globalMediaDone(
SharedMediaType type,
FullMsgId messageId,
Api::GlobalMediaResult &&parsed);
void sendSharedContact(
const QString &phone,
@@ -669,6 +683,17 @@ private:
};
base::flat_set<HistoryRequest> _historyRequests;
struct GlobalMediaRequest {
SharedMediaType mediaType = {};
FullMsgId aroundId;
SliceType sliceType = {};
friend inline auto operator<=>(
const GlobalMediaRequest&,
const GlobalMediaRequest&) = default;
};
base::flat_set<GlobalMediaRequest> _globalMediaRequests;
std::unique_ptr<DialogsLoadState> _dialogsLoadState;
TimeId _dialogsLoadTill = 0;
rpl::variable<bool> _dialogsLoadMayBlockByDate = false;

View File

@@ -262,10 +262,16 @@ void ShowAddParticipantsError(
return tr::lng_bot_already_in_group(tr::now);
} else if (error == u"BOT_GROUPS_BLOCKED"_q) {
return tr::lng_error_cant_add_bot(tr::now);
} else if (error == u"ADMINS_TOO_MUCH"_q) {
return ((chat->isChat() || chat->isMegagroup())
? tr::lng_error_admin_limit
: tr::lng_error_admin_limit_channel)(tr::now);
} else if (error == u"YOU_BLOCKED_USER"_q) {
return tr::lng_error_you_blocked_user(tr::now);
} else if (error == u"CHAT_ADMIN_INVITE_REQUIRED"_q) {
return tr::lng_error_add_admin_not_member(tr::now);
} else if (error == u"USER_ADMIN_INVALID"_q) {
return tr::lng_error_user_admin_invalid(tr::now);
} else if (error == u"BOTS_TOO_MUCH"_q) {
return (chat->isChannel()
? tr::lng_error_channel_bots_too_much
: tr::lng_error_group_bots_too_much)(tr::now);
}
return tr::lng_failed_add_participant(tr::now);
}();

View File

@@ -154,9 +154,7 @@ contactsSortButton: IconButton(defaultIconButton) {
iconPosition: point(10px, -1px);
rippleAreaPosition: point(1px, 6px);
rippleAreaSize: 42px;
ripple: RippleAnimation(defaultRippleAnimation) {
color: windowBgOver;
}
ripple: defaultRippleAnimationBgOver;
}
contactsSortOnlineIcon: icon{{ "contacts_online", boxTitleCloseFg }};
contactsSortOnlineIconOver: icon{{ "contacts_online", boxTitleCloseFgOver }};
@@ -416,9 +414,7 @@ calendarPrevious: IconButton {
rippleAreaPosition: point(2px, 2px);
rippleAreaSize: 44px;
ripple: RippleAnimation(defaultRippleAnimation) {
color: windowBgOver;
}
ripple: defaultRippleAnimationBgOver;
}
calendarPreviousDisabled: icon {{ "calendar_down-flip_vertical", menuIconFg }};
calendarNext: IconButton(calendarPrevious) {
@@ -616,9 +612,7 @@ proxyTryIPv6Padding: margins(22px, 8px, 22px, 5px);
proxyRowPadding: margins(22px, 8px, 8px, 8px);
proxyRowIconSkip: 32px;
proxyRowSkip: 2px;
proxyRowRipple: RippleAnimation(defaultRippleAnimation) {
color: windowBgOver;
}
proxyRowRipple: defaultRippleAnimationBgOver;
proxyRowTitleFg: windowFg;
proxyRowTitlePalette: TextPalette(defaultTextPalette) {
linkFg: windowSubTextFg;
@@ -683,9 +677,7 @@ themesMenuToggle: IconButton(defaultIconButton) {
rippleAreaPosition: point(4px, 4px);
rippleAreaSize: 36px;
ripple: RippleAnimation(defaultRippleAnimation) {
color: windowBgOver;
}
ripple: defaultRippleAnimationBgOver;
}
themesMenuPosition: point(-2px, 25px);
@@ -738,9 +730,7 @@ createPollOptionRemove: CrossButton {
duration: 150;
loadingPeriod: 1000;
ripple: RippleAnimation(defaultRippleAnimation) {
color: windowBgOver;
}
ripple: defaultRippleAnimationBgOver;
}
createPollOptionRemovePosition: point(11px, 9px);
createPollOptionEmojiPositionSkip: 4px;
@@ -888,6 +878,13 @@ peerListWithInviteViaLink: PeerList(peerListBox) {
peerListSingleRow: PeerList(peerListBox) {
padding: margins(0px, 0px, 0px, 0px);
}
peerListSmallSkips: PeerList(peerListBox) {
padding: margins(
0px,
defaultVerticalListSkip,
0px,
defaultVerticalListSkip);
}
scheduleHeight: 95px;
scheduleDateTop: 38px;
@@ -951,9 +948,7 @@ sponsoredUrlButton: RoundButton(defaultActiveButton) {
textTop: 7px;
style: defaultTextStyle;
ripple: RippleAnimation(defaultRippleAnimation) {
color: windowBgOver;
}
ripple: defaultRippleAnimationBgOver;
}
requestPeerRestriction: FlatLabel(defaultFlatLabel) {

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