Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package telegram-desktop for
openSUSE:Factory checked in at 2026-04-16 17:26:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/telegram-desktop (Old)
and /work/SRC/openSUSE:Factory/.telegram-desktop.new.11940 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "telegram-desktop"
Thu Apr 16 17:26:02 2026 rev:151 rq:1347198 version:6.7.6
Changes:
--------
--- /work/SRC/openSUSE:Factory/telegram-desktop/telegram-desktop.changes
2026-04-08 17:15:41.767836332 +0200
+++
/work/SRC/openSUSE:Factory/.telegram-desktop.new.11940/telegram-desktop.changes
2026-04-16 17:26:25.426083041 +0200
@@ -1,0 +2,8 @@
+Wed Apr 15 22:42:17 UTC 2026 - Илья Индиго <[email protected]>
+
+- Updated td to git20260414.
+ * No changes provides.
+- Updated telegram-desktop to 6.7.6
+ * https://github.com/telegramdesktop/tdesktop/releases/tag/v6.7.6
+
+-------------------------------------------------------------------
@@ -5 +13 @@
- * no changes provides.
+ * No changes provides.
Old:
----
td-git20260406.tar.xz
tdesktop-6.7.5-full.tar.gz
New:
----
td-git20260414.tar.xz
tdesktop-6.7.6-full.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ telegram-desktop.spec ++++++
--- /var/tmp/diff_new_pack.UgBNwL/_old 2026-04-16 17:26:28.910226420 +0200
+++ /var/tmp/diff_new_pack.UgBNwL/_new 2026-04-16 17:26:28.926227078 +0200
@@ -23,9 +23,9 @@
%define ada_ver 3.4.4
%define h264_ver 2.6.0
%define owt_ver git20260123
-%define td_ver git20260406
+%define td_ver git20260414
Name: telegram-desktop
-Version: 6.7.5
+Version: 6.7.6
Release: 0
Summary: Messaging application with a focus on speed and security
License: GPL-3.0-only
++++++ td-git20260406.tar.xz -> td-git20260414.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/td-git20260406/CHANGELOG.md
new/td-git20260414/CHANGELOG.md
--- old/td-git20260406/CHANGELOG.md 2026-04-07 18:53:19.574981823 +0200
+++ new/td-git20260414/CHANGELOG.md 2026-04-16 00:40:10.733773892 +0200
@@ -463,7 +463,7 @@
call library versions.
* Added support for multiple pinned messages and the ability to pin messages
in private chats:
- Added the ability to pin messages in all private chats.
- - Added the ability to pin mutiple messages in all chats.
+ - Added the ability to pin multiple messages in all chats.
- Added the field `is_pinned` to the class `message`.
- Added the update `updateMessageIsPinned`.
- Added the parameter `only_for_self` to the method `pinChatMessage`,
allowing to pin messages in private chats for
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/td-git20260406/benchmark/bench_log.cpp
new/td-git20260414/benchmark/bench_log.cpp
--- old/td-git20260406/benchmark/bench_log.cpp 2026-04-07 18:53:19.577841945
+0200
+++ new/td-git20260414/benchmark/bench_log.cpp 2026-04-16 00:40:10.736224762
+0200
@@ -26,7 +26,7 @@
char file_name[] = "largefileXXXXXX";
int fd = mkstemp(file_name);
if (fd == -1) {
- perror("Can't cretate temporary file");
+ perror("Can't create temporary file");
}
CHECK(fd != -1);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/td-git20260406/example/README.md
new/td-git20260414/example/README.md
--- old/td-git20260406/example/README.md 2026-04-07 18:53:19.577981701
+0200
+++ new/td-git20260414/example/README.md 2026-04-16 00:40:10.736224762
+0200
@@ -107,10 +107,12 @@
TDLib can be used from the Kotlin/JVM programming language through same way as
in [Java](#java).
-You can also use [ktd](https://github.com/whyoleg/ktd) library with
Kotlin-specific bindings.
+See [tdl-coroutines](https://github.com/g000sha256/tdl-coroutines) - Kotlin
Multiplatform coroutine-based wrapper for TDLib.
See also [td-ktx](https://github.com/tdlibx/td-ktx) - Kotlin coroutines
wrapper for TDLib.
+You can also use [ktd](https://github.com/whyoleg/ktd) library with
Kotlin-specific bindings.
+
Also, see [Monogram](https://github.com/monogram-android/monogram), which is
an unofficial Telegram client for Android built with Jetpack Compose and
Material Design 3.
<a name="csharp"></a>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/td-git20260406/example/ios/build-openssl.sh
new/td-git20260414/example/ios/build-openssl.sh
--- old/td-git20260406/example/ios/build-openssl.sh 2026-04-07
18:53:19.578999038 +0200
+++ new/td-git20260414/example/ios/build-openssl.sh 2026-04-16
00:40:10.737312918 +0200
@@ -26,7 +26,7 @@
echo $platform
cd Python-Apple-support
#NB: -j will fail
- make OpenSSL-$platform || exit 1
+ SOURCE_DATE_EPOCH=1 ZERO_AR_DATE=1 make OpenSSL-$platform || exit 1
cd ..
rm -rf third_party/openssl/$platform || exit 1
mkdir -p third_party/openssl/$platform/lib || exit 1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/td-git20260406/example/ios/build.sh
new/td-git20260414/example/ios/build.sh
--- old/td-git20260406/example/ios/build.sh 2026-04-07 18:53:19.578999038
+0200
+++ new/td-git20260414/example/ios/build.sh 2026-04-16 00:40:10.737312918
+0200
@@ -66,7 +66,7 @@
mkdir -p $install
cd $build
cmake $td_path $options $other_options -DCMAKE_INSTALL_PREFIX=../${install}
- make -j3 install || exit
+ ZERO_AR_DATE=1 make -j3 install || exit
cd ..
install_name_tool -id @rpath/libtdjson.dylib ${install}/lib/libtdjson.dylib
mkdir -p ../tdjson/${platform}/include
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/td-git20260406/example/uwp/app/Properties/Default.rd.xml
new/td-git20260414/example/uwp/app/Properties/Default.rd.xml
--- old/td-git20260406/example/uwp/app/Properties/Default.rd.xml
2026-04-07 18:53:19.579888748 +0200
+++ new/td-git20260414/example/uwp/app/Properties/Default.rd.xml
2026-04-16 00:40:10.738201947 +0200
@@ -12,7 +12,7 @@
<TypeInstantiation Name="App1.AppClass" Arguments="System.Int32"
Activate="Required Public" />
Using the Namespace directive to apply reflection policy to all the types
in a particular namespace
- <Namespace Name="DataClasses.ViewModels" Seralize="All" />
+ <Namespace Name="DataClasses.ViewModels" Serialize="All" />
-->
<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/td-git20260406/td/generate/scheme/td_api.tl
new/td-git20260414/td/generate/scheme/td_api.tl
--- old/td-git20260406/td/generate/scheme/td_api.tl 2026-04-07
18:53:19.604980603 +0200
+++ new/td-git20260414/td/generate/scheme/td_api.tl 2026-04-16
00:40:10.763772677 +0200
@@ -119,7 +119,7 @@
//@description Represents a change of a text @offset Offset of the entity, in
UTF-16 code units @length Length of the entity, in UTF-16 code units @type Type
of the entity
diffEntity offset:int32 length:int32 type:DiffEntityType = DiffEntity;
-//@description A text with some changes highlighted @text The text @entities
Entities describing changes in the text. Entities doesn't mutually intersect
with each other
+//@description A text with some changes highlighted @text The text @entities
Entities describing changes in the text. Entities don't mutually intersect with
each other
diffText text:string entities:vector<diffEntity> = DiffText;
//@description A text fixed using fixTextWithAi @text The resulting text
@diff_text Changes made to the original text
@@ -182,7 +182,7 @@
//@description The user needs to confirm authorization on another logged in
device by scanning a QR code with the provided link @link A tg:// URL for the
QR code. The link will be updated frequently
authorizationStateWaitOtherDeviceConfirmation link:string = AuthorizationState;
-//@description The user is unregistered and need to accept terms of service
and enter their first name and last name to finish registration. Call
registerUser to accept the terms of service and provide the data
@terms_of_service Telegram terms of service
+//@description The user is unregistered and needs to accept terms of service
and enter their first name and last name to finish registration. Call
registerUser to accept the terms of service and provide the data
@terms_of_service Telegram terms of service
authorizationStateWaitRegistration terms_of_service:termsOfService =
AuthorizationState;
//@description The user has been authorized, but needs to enter a 2-step
verification password to start using the application.
@@ -1355,7 +1355,7 @@
//@class UpgradedGiftAttributeRarity @description Describes rarity of an
upgraded gift attribute
-//@description The rarity is represented as the numeric frequence of the model
+//@description The rarity is represented as the numeric frequency of the model
//@per_mille The number of upgraded gifts that receive this attribute for each
1000 gifts upgraded; if 0, then it can be shown as "<0.1%"
upgradedGiftAttributeRarityPerMille per_mille:int32 =
UpgradedGiftAttributeRarity;
@@ -2994,7 +2994,7 @@
//@description Contains a list of sponsored chats @chats List of sponsored
chats
sponsoredChats chats:vector<sponsoredChat> = SponsoredChats;
-//@description Describes an advertisent to be shown while a video from a
message is watched
+//@description Describes an advertisement to be shown while a video from a
message is watched
//@unique_id Unique identifier of this result
//@text Text of the advertisement
//@min_display_duration The minimum amount of time the advertisement must be
displayed before it can be hidden by the user, in seconds
@@ -5669,7 +5669,7 @@
//@can_get_message_thread True, if information about the message thread is
available through getMessageThread and getMessageThreadHistory
//@can_get_read_date True, if read date of the message can be received through
getMessageReadDate
//@can_get_statistics True, if message statistics are available through
getMessageStatistics and message forwards can be received using
getMessagePublicForwards
-//@can_get_video_advertisements True, if advertisements for video of the
message can be received though getVideoMessageAdvertisements
+//@can_get_video_advertisements True, if advertisements for video of the
message can be received through getVideoMessageAdvertisements
//@can_get_viewers True, if chat members already viewed the message can be
received through getMessageViewers
//@can_mark_tasks_as_done True, if tasks can be marked as done or not done in
the message's checklist using markChecklistTasksAsDone if the current user has
Telegram Premium subscription
//@can_recognize_speech True, if speech can be recognized for the message
through recognizeSpeech
@@ -9107,7 +9107,7 @@
//@description The file is a file from Secure storage used for storing
Telegram Passport files
fileTypeSecure = FileType;
-//@description The file is a seld-destructing video for a live photo in a
private chat
+//@description The file is a self-destructing video for a live photo in a
private chat
fileTypeSelfDestructingLivePhotoVideo = FileType;
//@description The file is a self-destructing photo in a private chat
@@ -14492,7 +14492,7 @@
//@password The 2-step verification password of the current user
getUpgradedGiftWithdrawalUrl received_gift_id:string password:string = HttpUrl;
-//@description Returns promotional anumation for upgraded gifts
+//@description Returns promotional animation for upgraded gifts
getUpgradedGiftsPromotionalAnimation = Animation;
//@description Changes resale price of a unique gift owned by the current user
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/td-git20260406/td/mtproto/TlsInit.cpp
new/td-git20260414/td/mtproto/TlsInit.cpp
--- old/td-git20260406/td/mtproto/TlsInit.cpp 2026-04-07 18:53:19.607474355
+0200
+++ new/td-git20260414/td/mtproto/TlsInit.cpp 2026-04-16 00:40:10.766778686
+0200
@@ -51,6 +51,7 @@
BeginScope,
EndScope,
Permutation,
+ RandomValue,
Padding
};
Type type;
@@ -58,6 +59,7 @@
int seed;
string data;
vector<vector<Op>> parts;
+ vector<Op> value;
static Op str(Slice str) {
Op res;
@@ -114,6 +116,13 @@
res.parts = std::move(parts);
return res;
}
+ static Op random_value(vector<vector<Op>> parts) {
+ CHECK(!parts.empty());
+ Op res;
+ res.type = Type::RandomValue;
+ res.value = parts[Random::fast(0, static_cast<int>(parts.size() - 1))];
+ return res;
+ }
static Op ech_payload() {
Op res;
res.type = Type::Random;
@@ -132,14 +141,23 @@
TlsHello res;
#if TD_DARWIN
res.ops_ = {
- Op::str("\x16\x03\x01\x02\x00\x01\x00\x01\xfc\x03\x03"),
+ Op::str("\x16\x03\x01"),
+ Op::begin_scope(),
+ Op::str("\x01\x00"),
+ Op::begin_scope(),
+ Op::str("\x03\x03"),
Op::zero(32),
Op::str("\x20"),
Op::random(32),
- Op::str("\x00\x2a"),
- Op::grease(0),
-
Op::str("\x13\x01\x13\x02\x13\x03\xc0\x2c\xc0\x2b\xcc\xa9\xc0\x30\xc0\x2f\xcc\xa8\xc0\x0a\xc0\x09\xc0\x14"
-
"\xc0\x13\x00\x9d\x00\x9c\x00\x35\x00\x2f\xc0\x08\xc0\x12\x00\x0a\x01\x00\x01\x89"),
+ Op::random_value(
+ {vector<Op>{Op::str("\x00\x1c"), Op::grease(0),
+
Op::str("\x13\x02\x13\x01\x13\x03\xc0\x2c\xc0\x30\xc0\x2b\xcc\xa9\xc0\x2f\xcc\xa8\xc0\x0a\xc0"
+ "\x09\xc0\x14\xc0\x13")},
+ vector<Op>{Op::str("\x00\x2a"), Op::grease(0),
+
Op::str("\x13\x02\x13\x03\x13\x01\xc0\x2c\xc0\x2b\xcc\xa9\xc0\x30\xc0\x2f\xcc\xa8\xc0\x0a\xc0"
+
"\x09\xc0\x14\xc0\x13\x00\x9d\x00\x9c\x00\x35\x00\x2f\xc0\x08\xc0\x12\x00\x0a")}}),
+ Op::str("\x01\x00"),
+ Op::begin_scope(),
Op::grease(2),
Op::str("\x00\x00\x00\x00"),
Op::begin_scope(),
@@ -150,21 +168,28 @@
Op::end_scope(),
Op::end_scope(),
Op::end_scope(),
-
Op::str("\x00\x17\x00\x00\xff\x01\x00\x01\x00\x00\x0a\x00\x0c\x00\x0a"),
+
Op::str("\x00\x17\x00\x00\xff\x01\x00\x01\x00\x00\x0a\x00\x0e\x00\x0c"),
Op::grease(4),
- Op::str(
-
"\x00\x1d\x00\x17\x00\x18\x00\x19\x00\x0b\x00\x02\x01\x00\x00\x10\x00\x0e\x00\x0c\x02\x68\x32\x08\x68\x74"
-
"\x74\x70\x2f\x31\x2e\x31\x00\x05\x00\x05\x01\x00\x00\x00\x00\x00\x0d\x00\x16\x00\x14\x04\x03\x08\x04\x04"
-
"\x01\x05\x03\x08\x05\x08\x05\x05\x01\x08\x06\x06\x01\x02\x01\x00\x12\x00\x00\x00\x33\x00\x2b\x00\x29"),
+
Op::str("\x11\xec\x00\x1d\x00\x17\x00\x18\x00\x19\x00\x0b\x00\x02\x01\x00"),
+ Op::random_value(
+
{vector<Op>{Op::str("\x00\x10\x00\x0b\x00\x09\x08\x68\x74\x74\x70\x2f\x31\x2e\x31")},
+
vector<Op>{Op::str("\x00\x10\x00\x0e\x00\x0c\x02\x68\x32\x08\x68\x74\x74\x70\x2f\x31\x2e\x31")}}),
+
Op::str("\x00\x05\x00\x05\x01\x00\x00\x00\x00\x00\x0d\x00\x16\x00\x14\x04\x03\x08\x04\x04\x01\x05\x03\x08\x05"
+
"\x08\x05\x05\x01\x08\x06\x06\x01\x02\x01\x00\x12\x00\x00\x00\x33\x04\xef\x04\xed"),
Op::grease(4),
- Op::str("\x00\x01\x00\x00\x1d\x00\x20"),
+ Op::str("\x00\x01\x00\x11\xec\x04\xc0"),
+ Op::ml_kem_768_key(),
Op::key(),
- Op::str("\x00\x2d\x00\x02\x01\x01\x00\x2b\x00\x0b\x0a"),
+ Op::str("\x00\x1d\x00\x20"),
+ Op::key(),
+ Op::str("\x00\x2d\x00\x02\x01\x01\x00\x2b\x00\x07\x06"),
Op::grease(6),
-
Op::str("\x03\x04\x03\x03\x03\x02\x03\x01\x00\x1b\x00\x03\x02\x00\x01"),
+ Op::str("\x03\x04\x03\x03\x00\x1b\x00\x03\x02\x00\x01"),
Op::grease(3),
Op::str("\x00\x01\x00"),
- Op::padding()};
+ Op::end_scope(),
+ Op::end_scope(),
+ Op::end_scope()};
#else
res.ops_ = {
Op::str("\x16\x03\x01"),
@@ -307,14 +332,18 @@
}
break;
}
- case Type::Permutation: {
+ case Type::Permutation:
for (const auto &part : op.parts) {
for (auto &nested_op : part) {
do_op(nested_op, context);
}
}
break;
- }
+ case Type::RandomValue:
+ for (auto &nested_op : op.value) {
+ do_op(nested_op, context);
+ }
+ break;
case Type::Padding:
if (size_ < 513) {
size_ = 517;
@@ -458,6 +487,11 @@
}
break;
}
+ case Type::RandomValue:
+ for (auto &nested_op : op.value) {
+ do_op(nested_op, context);
+ }
+ break;
case Type::Padding: {
auto size = 513 - static_cast<int>(get_offset());
if (size > 0) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/td-git20260406/td/telegram/ConfigManager.cpp
new/td-git20260414/td/telegram/ConfigManager.cpp
--- old/td-git20260406/td/telegram/ConfigManager.cpp 2026-04-07
18:53:19.614980196 +0200
+++ new/td-git20260414/td/telegram/ConfigManager.cpp 2026-04-16
00:40:10.774772231 +0200
@@ -268,9 +268,10 @@
}
static const string payload = generate_firebase_remote_config_payload();
- string url =
-
"https://firebaseremoteconfig.googleapis.com/v1/projects/peak-vista-421/namespaces/"
- "firebase:fetch?key=AIzaSyC2-kAkpDsroixRXw-sTw-Wfqo4NxjMwwM";
+ auto url =
+ PSTRING()
+ <<
"https://firebaseremoteconfig.googleapis.com/v1/projects/peak-vista-421/namespaces/firebase:fetch?key="
+ <<
hex_decode("41497a61537943322d6b416b704473726f69785258772d7354772d5766716f344e786a4d77774d").move_as_ok();
auto get_config = [](HttpQuery &http_query) -> Result<string> {
TRY_RESULT(json, json_decode(http_query.get_arg("entries")));
if (json.type() != JsonValue::Type::Object) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/td-git20260406/td/telegram/GroupCallManager.cpp
new/td-git20260414/td/telegram/GroupCallManager.cpp
--- old/td-git20260406/td/telegram/GroupCallManager.cpp 2026-04-07
18:53:19.619979993 +0200
+++ new/td-git20260414/td/telegram/GroupCallManager.cpp 2026-04-16
00:40:10.779772029 +0200
@@ -3601,7 +3601,7 @@
send_update_live_story_top_donors(group_call->group_call_id,
group_call_participants);
}
}
- // don't neet to undo updateNewGroupCallPaidReaction
+ // don't need to undo updateNewGroupCallPaidReaction
}
int32 GroupCallManager::add_group_call_message(InputGroupCallId
input_group_call_id, GroupCall *group_call,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/td-git20260406/td/telegram/LinkManager.cpp
new/td-git20260414/td/telegram/LinkManager.cpp
--- old/td-git20260406/td/telegram/LinkManager.cpp 2026-04-07
18:53:19.621979912 +0200
+++ new/td-git20260414/td/telegram/LinkManager.cpp 2026-04-16
00:40:10.781771947 +0200
@@ -2151,9 +2151,10 @@
if (is_valid_username(username)) {
if (has_arg("post")) {
//
resolve?domain=<username>&post=12345&single&thread=<thread_id>&comment=<message_id>&t=<media_timestamp>
- return td::make_unique<InternalLinkMessage>(
- PSTRING() << "tg://resolve" << copy_arg("domain") <<
copy_arg("post") << copy_arg("single")
- << copy_arg("thread") << copy_arg("comment") <<
copy_arg("t"));
+ return td::make_unique<InternalLinkMessage>(PSTRING()
+ << "tg://resolve" <<
copy_arg("domain") << copy_arg("post")
+ << copy_arg("single") <<
copy_arg("thread") << copy_arg("comment")
+ << copy_arg("t") <<
copy_arg("task") << copy_arg("option"));
}
if (username == "oauth" && has_arg("startapp")) {
return td::make_unique<InternalLinkOauth>(PSTRING()
@@ -2460,9 +2461,10 @@
} else if (path.size() == 1 && path[0] == "privatepost") {
//
privatepost?channel=123456789&post=12345&single&thread=<thread_id>&comment=<message_id>&t=<media_timestamp>
if (has_arg("channel") && has_arg("post")) {
- return td::make_unique<InternalLinkMessage>(
- PSTRING() << "tg://privatepost" << copy_arg("channel") <<
copy_arg("post") << copy_arg("single")
- << copy_arg("thread") << copy_arg("comment") <<
copy_arg("t"));
+ return td::make_unique<InternalLinkMessage>(PSTRING()
+ << "tg://privatepost" <<
copy_arg("channel") << copy_arg("post")
+ << copy_arg("single") <<
copy_arg("thread") << copy_arg("comment")
+ << copy_arg("t") <<
copy_arg("task") << copy_arg("option"));
}
} else if (path.size() == 1 && path[0] == "boost") {
// boost?domain=channel_username
@@ -2572,7 +2574,8 @@
}
return td::make_unique<InternalLinkMessage>(PSTRING() <<
"tg://privatepost?channel=" << to_integer<int64>(path[1])
<< "&post=" <<
post << copy_arg("single") << thread
- <<
copy_arg("comment") << copy_arg("t"));
+ <<
copy_arg("comment") << copy_arg("t") << copy_arg("task")
+ <<
copy_arg("option"));
} else if (path.size() >= 2 && to_integer<int64>(path[1]) > 0 &&
url_query.has_arg("boost")) {
// /c/123456789?boost
return td::make_unique<InternalLinkDialogBoost>(PSTRING() <<
"tg://boost?channel=" << to_integer<int64>(path[1]));
@@ -2755,9 +2758,9 @@
thread = PSTRING() << "&thread=" << post;
post = to_integer<int64>(path[2]);
}
- return td::make_unique<InternalLinkMessage>(PSTRING() <<
"tg://resolve?domain=" << url_encode(path[0])
- << "&post=" <<
post << copy_arg("single") << thread
- <<
copy_arg("comment") << copy_arg("t"));
+ return td::make_unique<InternalLinkMessage>(
+ PSTRING() << "tg://resolve?domain=" << url_encode(path[0]) <<
"&post=" << post << copy_arg("single") << thread
+ << copy_arg("comment") << copy_arg("t") <<
copy_arg("task") << copy_arg("option"));
}
auto username = path[0];
if (to_lower(username) == "boost") {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/td-git20260406/td/telegram/MessageContent.cpp
new/td-git20260414/td/telegram/MessageContent.cpp
--- old/td-git20260406/td/telegram/MessageContent.cpp 2026-04-07
18:53:19.622979871 +0200
+++ new/td-git20260414/td/telegram/MessageContent.cpp 2026-04-16
00:40:10.782771906 +0200
@@ -6819,6 +6819,15 @@
}
}
+PollId get_message_content_poll_id(const MessageContent *content) {
+ switch (content->get_type()) {
+ case MessageContentType::Poll:
+ return static_cast<const MessagePoll *>(content)->poll_id;
+ default:
+ return PollId();
+ }
+}
+
bool get_message_content_poll_is_anonymous(const Td *td, const MessageContent
*content) {
switch (content->get_type()) {
case MessageContentType::Poll:
@@ -6946,42 +6955,6 @@
}
}
-void add_message_content_poll_option(Td *td, const MessageContent *content,
MessageFullId message_full_id,
-
td_api::object_ptr<td_api::inputPollOption> &&option, Promise<Unit> &&promise) {
- CHECK(content->get_type() == MessageContentType::Poll);
- td->poll_manager_->add_poll_option(static_cast<const MessagePoll
*>(content)->poll_id, message_full_id,
- std::move(option), std::move(promise));
-}
-
-void delete_message_content_poll_option(Td *td, const MessageContent *content,
MessageFullId message_full_id,
- const string &option_id, Promise<Unit>
&&promise) {
- CHECK(content->get_type() == MessageContentType::Poll);
- td->poll_manager_->delete_poll_option(static_cast<const MessagePoll
*>(content)->poll_id, message_full_id, option_id,
- std::move(promise));
-}
-
-void set_message_content_poll_answer(Td *td, const MessageContent *content,
MessageFullId message_full_id,
- vector<int32> &&option_ids, Promise<Unit>
&&promise) {
- CHECK(content->get_type() == MessageContentType::Poll);
- td->poll_manager_->set_poll_answer(static_cast<const MessagePoll
*>(content)->poll_id, message_full_id,
- std::move(option_ids),
std::move(promise));
-}
-
-void get_message_content_poll_voters(Td *td, const MessageContent *content,
MessageFullId message_full_id,
- int32 option_id, int32 offset, int32
limit,
-
Promise<td_api::object_ptr<td_api::pollVoters>> &&promise) {
- CHECK(content->get_type() == MessageContentType::Poll);
- td->poll_manager_->get_poll_voters(static_cast<const MessagePoll
*>(content)->poll_id, message_full_id, option_id,
- offset, limit, std::move(promise));
-}
-
-void stop_message_content_poll(Td *td, const MessageContent *content,
MessageFullId message_full_id,
- unique_ptr<ReplyMarkup> &&reply_markup,
Promise<Unit> &&promise) {
- CHECK(content->get_type() == MessageContentType::Poll);
- td->poll_manager_->stop_poll(static_cast<const MessagePoll
*>(content)->poll_id, message_full_id,
- std::move(reply_markup), std::move(promise));
-}
-
static void merge_location_access_hash(const Location &first, const Location
&second) {
if (second.get_access_hash() != 0) {
first.set_access_hash(second.get_access_hash());
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/td-git20260406/td/telegram/MessageContent.h
new/td-git20260414/td/telegram/MessageContent.h
--- old/td-git20260406/td/telegram/MessageContent.h 2026-04-07
18:53:19.622979871 +0200
+++ new/td-git20260414/td/telegram/MessageContent.h 2026-04-16
00:40:10.782771906 +0200
@@ -24,6 +24,7 @@
#include "td/telegram/MessageId.h"
#include "td/telegram/MessageSelfDestructType.h"
#include "td/telegram/Photo.h"
+#include "td/telegram/PollId.h"
#include "td/telegram/QuickReplyMessageFullId.h"
#include "td/telegram/ReplyMarkup.h"
#include "td/telegram/secret_api.h"
@@ -189,6 +190,8 @@
int32 get_message_content_live_location_period(const MessageContent *content);
+PollId get_message_content_poll_id(const MessageContent *content);
+
bool get_message_content_poll_is_anonymous(const Td *td, const MessageContent
*content);
bool get_message_content_poll_is_closed(const Td *td, const MessageContent
*content);
@@ -219,22 +222,6 @@
bool can_message_content_have_media_timestamp(const MessageContent *content);
-void add_message_content_poll_option(Td *td, const MessageContent *content,
MessageFullId message_full_id,
-
td_api::object_ptr<td_api::inputPollOption> &&option, Promise<Unit> &&promise);
-
-void delete_message_content_poll_option(Td *td, const MessageContent *content,
MessageFullId message_full_id,
- const string &option_id, Promise<Unit>
&&promise);
-
-void set_message_content_poll_answer(Td *td, const MessageContent *content,
MessageFullId message_full_id,
- vector<int32> &&option_ids, Promise<Unit>
&&promise);
-
-void get_message_content_poll_voters(Td *td, const MessageContent *content,
MessageFullId message_full_id,
- int32 option_id, int32 offset, int32
limit,
-
Promise<td_api::object_ptr<td_api::pollVoters>> &&promise);
-
-void stop_message_content_poll(Td *td, const MessageContent *content,
MessageFullId message_full_id,
- unique_ptr<ReplyMarkup> &&reply_markup,
Promise<Unit> &&promise);
-
void merge_message_contents(Td *td, const MessageContent *old_content,
MessageContent *new_content,
bool need_message_changed_warning, DialogId
dialog_id, bool need_merge_files,
bool &is_content_changed, bool &need_update);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/td-git20260406/td/telegram/MessageReactor.cpp
new/td-git20260414/td/telegram/MessageReactor.cpp
--- old/td-git20260406/td/telegram/MessageReactor.cpp 2026-04-07
18:53:19.625979749 +0200
+++ new/td-git20260414/td/telegram/MessageReactor.cpp 2026-04-16
00:40:10.785771786 +0200
@@ -117,7 +117,7 @@
}
if (reactor.is_me()) {
if (was_me) {
- LOG(ERROR) << "Receive self mutiple times";
+ LOG(ERROR) << "Receive self multiple times";
return true;
}
was_me = true;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/td-git20260406/td/telegram/MessagesManager.cpp
new/td-git20260414/td/telegram/MessagesManager.cpp
--- old/td-git20260406/td/telegram/MessagesManager.cpp 2026-04-07
18:53:19.627979668 +0200
+++ new/td-git20260414/td/telegram/MessagesManager.cpp 2026-04-16
00:40:10.787771704 +0200
@@ -14836,14 +14836,16 @@
return promise.set_value(td_api::make_object<td_api::formattedText>());
}
- auto skip_bot_commands =
need_skip_bot_commands(message_full_id.get_dialog_id(), m);
- auto max_media_timestamp = get_message_max_media_timestamp(m);
+ TranslationManager::InputText input_text;
+ input_text.text_ = *text;
+ input_text.skip_bot_commands_ =
need_skip_bot_commands(message_full_id.get_dialog_id(), m);
+ input_text.max_media_timestamp_ = get_message_max_media_timestamp(m);
auto dialog_id = message_full_id.get_dialog_id();
auto has_autotranslation = dialog_id.get_type() == DialogType::Channel &&
td_->dialog_manager_->have_input_peer(dialog_id,
false, AccessRights::Read) &&
m->message_id.is_server() &&
td_->chat_manager_->get_channel_autotranslation(dialog_id.get_channel_id());
- td_->translation_manager_->translate_text(*text, skip_bot_commands,
max_media_timestamp,
+ td_->translation_manager_->translate_text(std::move(input_text),
has_autotranslation ?
message_full_id : MessageFullId(), to_language_code,
tone, std::move(promise));
}
@@ -15408,9 +15410,6 @@
if (todo_item_id != 0) {
sb << "&task=" << todo_item_id;
}
- if (todo_item_id != 0) {
- sb << "&task=" << todo_item_id;
- }
if (!poll_option_id.empty()) {
sb << "&option=" << base64url_encode(poll_option_id);
}
@@ -23478,7 +23477,12 @@
return true;
}
+bool MessagesManager::has_message_sender_user_id(MessageFullId
message_full_id) const {
+ return has_message_sender_user_id(message_full_id.get_dialog_id(),
get_message(message_full_id));
+}
+
bool MessagesManager::has_message_sender_user_id(DialogId dialog_id, const
Message *m) const {
+ CHECK(m != nullptr);
if (!m->sender_user_id.is_valid()) {
return false;
}
@@ -35975,97 +35979,6 @@
suffix_load_add_query(d, std::make_pair(std::move(promise),
std::move(condition)));
}
-void MessagesManager::add_poll_option(MessageFullId message_full_id,
-
td_api::object_ptr<td_api::inputPollOption> &&option, Promise<Unit> &&promise) {
- auto m = get_message_force(message_full_id, "add_poll_option");
- if (!can_add_message_poll_option(message_full_id.get_dialog_id(), m)) {
- return promise.set_error(400, "Invalid message specified");
- }
- add_message_content_poll_option(td_, m->content.get(), message_full_id,
std::move(option), std::move(promise));
-}
-
-void MessagesManager::delete_poll_option(MessageFullId message_full_id, const
string &option_id,
- Promise<Unit> &&promise) {
- auto m = get_message_force(message_full_id, "delete_poll_option");
- delete_message_content_poll_option(td_, m->content.get(), message_full_id,
option_id, std::move(promise));
-}
-
-void MessagesManager::set_poll_answer(MessageFullId message_full_id,
vector<int32> &&option_ids,
- Promise<Unit> &&promise) {
- auto m = get_message_force(message_full_id, "set_poll_answer");
- if (m == nullptr) {
- return promise.set_error(400, "Message not found");
- }
- if (!td_->dialog_manager_->have_input_peer(message_full_id.get_dialog_id(),
true, AccessRights::Read)) {
- return promise.set_error(400, "Can't access the chat");
- }
- if (m->content->get_type() != MessageContentType::Poll) {
- return promise.set_error(400, "Message is not a poll");
- }
- if (m->message_id.is_scheduled()) {
- return promise.set_error(400, "Can't answer polls from scheduled
messages");
- }
- if (!m->message_id.is_server()) {
- return promise.set_error(400, "Poll can't be answered");
- }
-
- set_message_content_poll_answer(td_, m->content.get(), message_full_id,
std::move(option_ids), std::move(promise));
-}
-
-void MessagesManager::get_poll_voters(MessageFullId message_full_id, int32
option_id, int32 offset, int32 limit,
-
Promise<td_api::object_ptr<td_api::pollVoters>> &&promise) {
- auto m = get_message_force(message_full_id, "get_poll_voters");
- if (m == nullptr) {
- return promise.set_error(400, "Message not found");
- }
- if (!td_->dialog_manager_->have_input_peer(message_full_id.get_dialog_id(),
true, AccessRights::Read)) {
- return promise.set_error(400, "Can't access the chat");
- }
- if (m->content->get_type() != MessageContentType::Poll) {
- return promise.set_error(400, "Message is not a poll");
- }
- if (m->message_id.is_scheduled()) {
- return promise.set_error(400, "Can't get poll results from scheduled
messages");
- }
- if (!m->message_id.is_server()) {
- return promise.set_error(400, "Poll results can't be received");
- }
-
- get_message_content_poll_voters(td_, m->content.get(), message_full_id,
option_id, offset, limit, std::move(promise));
-}
-
-void MessagesManager::stop_poll(MessageFullId message_full_id,
td_api::object_ptr<td_api::ReplyMarkup> &&reply_markup,
- Promise<Unit> &&promise) {
- auto m = get_message_force(message_full_id, "stop_poll");
- if (m == nullptr) {
- return promise.set_error(400, "Message not found");
- }
- if (!td_->dialog_manager_->have_input_peer(message_full_id.get_dialog_id(),
true, AccessRights::Read)) {
- return promise.set_error(400, "Can't access the chat");
- }
- if (m->content->get_type() != MessageContentType::Poll) {
- return promise.set_error(400, "Message is not a poll");
- }
- if (get_message_content_poll_is_closed(td_, m->content.get())) {
- return promise.set_error(400, "Poll has already been closed");
- }
- if (!can_edit_message(message_full_id.get_dialog_id(), m, true)) {
- return promise.set_error(400, "Poll can't be stopped");
- }
- if (m->message_id.is_scheduled()) {
- return promise.set_error(400, "Can't stop polls from scheduled messages");
- }
- if (!m->message_id.is_server()) {
- return promise.set_error(400, "Poll can't be stopped");
- }
-
- TRY_RESULT_PROMISE(promise, new_reply_markup,
- get_inline_reply_markup(std::move(reply_markup),
td_->auth_manager_->is_bot(),
-
has_message_sender_user_id(message_full_id.get_dialog_id(), m)));
-
- stop_message_content_poll(td_, m->content.get(), message_full_id,
std::move(new_reply_markup), std::move(promise));
-}
-
bool MessagesManager::need_poll_group_call_message(MessageFullId
message_full_id) {
auto m = get_message(message_full_id);
CHECK(m != nullptr);
@@ -36126,6 +36039,27 @@
return std::move(result);
}
+Result<PollId> MessagesManager::get_message_poll_id(MessageFullId
message_full_id, bool to_stop) {
+ auto m = get_message_force(message_full_id, "get_message_poll_id");
+ if (m == nullptr) {
+ return Status::Error(400, "Message not found");
+ }
+ if (m->content->get_type() != MessageContentType::Poll) {
+ return Status::Error(400, "Message is not a poll");
+ }
+ if (!td_->dialog_manager_->have_input_peer(message_full_id.get_dialog_id(),
false, AccessRights::Read)) {
+ return Status::Error(400, "Can't access the chat");
+ }
+ if (m->message_id.is_scheduled() || !m->message_id.is_server()) {
+ return Status::Error(400, "Wrong poll message specified");
+ }
+ if (to_stop && !can_edit_message(message_full_id.get_dialog_id(), m, true)) {
+ return Status::Error(400, "Poll can't be stopped");
+ }
+
+ return get_message_content_poll_id(m->content.get());
+}
+
Result<ServerMessageId>
MessagesManager::get_group_call_message_id(MessageFullId message_full_id) {
auto m = get_message_force(message_full_id, "get_group_call_message_id");
if (m == nullptr) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/td-git20260406/td/telegram/MessagesManager.h
new/td-git20260414/td/telegram/MessagesManager.h
--- old/td-git20260406/td/telegram/MessagesManager.h 2026-04-07
18:53:19.627979668 +0200
+++ new/td-git20260414/td/telegram/MessagesManager.h 2026-04-16
00:40:10.787771704 +0200
@@ -57,6 +57,7 @@
#include "td/telegram/NotificationId.h"
#include "td/telegram/NotificationSettingsScope.h"
#include "td/telegram/OrderedMessage.h"
+#include "td/telegram/PollId.h"
#include "td/telegram/QuickReplyShortcutId.h"
#include "td/telegram/ReactionType.h"
#include "td/telegram/ReactionUnavailabilityReason.h"
@@ -967,19 +968,6 @@
void on_binlog_events(vector<BinlogEvent> &&events);
- void add_poll_option(MessageFullId message_full_id,
td_api::object_ptr<td_api::inputPollOption> &&option,
- Promise<Unit> &&promise);
-
- void delete_poll_option(MessageFullId message_full_id, const string
&option_id, Promise<Unit> &&promise);
-
- void set_poll_answer(MessageFullId message_full_id, vector<int32>
&&option_ids, Promise<Unit> &&promise);
-
- void get_poll_voters(MessageFullId message_full_id, int32 option_id, int32
offset, int32 limit,
- Promise<td_api::object_ptr<td_api::pollVoters>>
&&promise);
-
- void stop_poll(MessageFullId message_full_id,
td_api::object_ptr<td_api::ReplyMarkup> &&reply_markup,
- Promise<Unit> &&promise);
-
int64 get_message_random_id(MessageFullId message_full_id);
bool need_poll_group_call_message(MessageFullId message_full_id);
@@ -997,6 +985,10 @@
};
Result<InvoiceMessageInfo> get_invoice_message_info(MessageFullId
message_full_id);
+ bool has_message_sender_user_id(MessageFullId message_full_id) const;
+
+ Result<PollId> get_message_poll_id(MessageFullId message_full_id, bool
to_stop);
+
Result<ServerMessageId> get_group_call_message_id(MessageFullId
message_full_id);
Result<ServerMessageId> get_payment_successful_message_id(MessageFullId
message_full_id);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/td-git20260406/td/telegram/PollManager.cpp
new/td-git20260414/td/telegram/PollManager.cpp
--- old/td-git20260406/td/telegram/PollManager.cpp 2026-04-07
18:53:19.630979546 +0200
+++ new/td-git20260414/td/telegram/PollManager.cpp 2026-04-16
00:40:10.789771623 +0200
@@ -1061,8 +1061,9 @@
return result;
}
-void PollManager::add_poll_option(PollId poll_id, MessageFullId
message_full_id,
- td_api::object_ptr<td_api::inputPollOption>
&&option, Promise<Unit> &&promise) {
+void PollManager::add_poll_option(MessageFullId message_full_id,
td_api::object_ptr<td_api::inputPollOption> &&option,
+ Promise<Unit> &&promise) {
+ TRY_RESULT_PROMISE(promise, poll_id,
td_->messages_manager_->get_message_poll_id(message_full_id, false));
if (option == nullptr) {
return promise.set_error(400, "Poll option must be non-empty");
}
@@ -1076,16 +1077,13 @@
td_->create_handler<AddPollAnswerQuery>(std::move(promise))->send(message_full_id,
poll_option);
}
-void PollManager::delete_poll_option(PollId poll_id, MessageFullId
message_full_id, const string &option_id,
- Promise<Unit> &&promise) {
- if (!message_full_id.get_message_id().is_server()) {
- return promise.set_error(400, "Invalid message specified");
- }
+void PollManager::delete_poll_option(MessageFullId message_full_id, const
string &option_id, Promise<Unit> &&promise) {
+ TRY_RESULT_PROMISE(promise, poll_id,
td_->messages_manager_->get_message_poll_id(message_full_id, false));
td_->create_handler<DeletePollAnswerQuery>(std::move(promise))->send(message_full_id,
option_id);
}
-void PollManager::set_poll_answer(PollId poll_id, MessageFullId
message_full_id, vector<int32> &&option_ids,
- Promise<Unit> &&promise) {
+void PollManager::set_poll_answer(MessageFullId message_full_id, vector<int32>
&&option_ids, Promise<Unit> &&promise) {
+ TRY_RESULT_PROMISE(promise, poll_id,
td_->messages_manager_->get_message_poll_id(message_full_id, false));
td::unique(option_ids);
if (is_local_poll_id(poll_id)) {
@@ -1386,8 +1384,9 @@
return (is_voted && !poll->hide_results_until_close_) || poll->is_closed_ ||
poll->is_creator_;
}
-void PollManager::get_poll_voters(PollId poll_id, MessageFullId
message_full_id, int32 option_id, int32 offset,
- int32 limit,
Promise<td_api::object_ptr<td_api::pollVoters>> &&promise) {
+void PollManager::get_poll_voters(MessageFullId message_full_id, int32
option_id, int32 offset, int32 limit,
+
Promise<td_api::object_ptr<td_api::pollVoters>> &&promise) {
+ TRY_RESULT_PROMISE(promise, poll_id,
td_->messages_manager_->get_message_poll_id(message_full_id, false));
if (offset < 0) {
return promise.set_error(400, "Invalid offset specified");
}
@@ -1547,8 +1546,15 @@
}
}
-void PollManager::stop_poll(PollId poll_id, MessageFullId message_full_id,
unique_ptr<ReplyMarkup> &&reply_markup,
+void PollManager::stop_poll(MessageFullId message_full_id,
td_api::object_ptr<td_api::ReplyMarkup> &&reply_markup,
Promise<Unit> &&promise) {
+ TRY_RESULT_PROMISE(promise, poll_id,
td_->messages_manager_->get_message_poll_id(message_full_id, true));
+ if (get_poll_is_closed(poll_id)) {
+ return promise.set_error(400, "Poll has already been closed");
+ }
+ TRY_RESULT_PROMISE(promise, new_reply_markup,
+ get_inline_reply_markup(std::move(reply_markup),
td_->auth_manager_->is_bot(),
+
td_->messages_manager_->has_message_sender_user_id(message_full_id)));
if (is_local_poll_id(poll_id)) {
LOG(ERROR) << "Receive local " << poll_id << " from " << message_full_id
<< " in stop_poll";
stop_local_poll(poll_id);
@@ -1568,7 +1574,7 @@
save_poll(poll, poll_id);
notify_on_poll_update(poll_id);
- do_stop_poll(poll_id, message_full_id, std::move(reply_markup), 0,
std::move(promise));
+ do_stop_poll(poll_id, message_full_id, std::move(new_reply_markup), 0,
std::move(promise));
}
class PollManager::StopPollLogEvent {
@@ -2292,7 +2298,7 @@
}
if (options.size() != positions.size()) {
LOG(ERROR) << "Receive updateMessagePollVote from " << dialog_id << " in "
<< poll_id
- << " with mistmatch option size";
+ << " with mismatch option size";
return;
}
CHECK(td_->auth_manager_->is_bot());
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/td-git20260406/td/telegram/PollManager.h
new/td-git20260414/td/telegram/PollManager.h
--- old/td-git20260406/td/telegram/PollManager.h 2026-04-07
18:53:19.630979546 +0200
+++ new/td-git20260414/td/telegram/PollManager.h 2026-04-16
00:40:10.789771623 +0200
@@ -90,19 +90,17 @@
vector<FileId> get_poll_file_ids(PollId poll_id) const;
- void add_poll_option(PollId poll_id, MessageFullId message_full_id,
- td_api::object_ptr<td_api::inputPollOption> &&option,
Promise<Unit> &&promise);
+ void add_poll_option(MessageFullId message_full_id,
td_api::object_ptr<td_api::inputPollOption> &&option,
+ Promise<Unit> &&promise);
- void delete_poll_option(PollId poll_id, MessageFullId message_full_id, const
string &option_id,
- Promise<Unit> &&promise);
+ void delete_poll_option(MessageFullId message_full_id, const string
&option_id, Promise<Unit> &&promise);
- void set_poll_answer(PollId poll_id, MessageFullId message_full_id,
vector<int32> &&option_ids,
- Promise<Unit> &&promise);
+ void set_poll_answer(MessageFullId message_full_id, vector<int32>
&&option_ids, Promise<Unit> &&promise);
- void get_poll_voters(PollId poll_id, MessageFullId message_full_id, int32
option_id, int32 offset, int32 limit,
+ void get_poll_voters(MessageFullId message_full_id, int32 option_id, int32
offset, int32 limit,
Promise<td_api::object_ptr<td_api::pollVoters>>
&&promise);
- void stop_poll(PollId poll_id, MessageFullId message_full_id,
unique_ptr<ReplyMarkup> &&reply_markup,
+ void stop_poll(MessageFullId message_full_id,
td_api::object_ptr<td_api::ReplyMarkup> &&reply_markup,
Promise<Unit> &&promise);
void stop_local_poll(PollId poll_id);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/td-git20260406/td/telegram/QueryCombiner.cpp
new/td-git20260414/td/telegram/QueryCombiner.cpp
--- old/td-git20260406/td/telegram/QueryCombiner.cpp 2026-04-07
18:53:19.630979546 +0200
+++ new/td-git20260414/td/telegram/QueryCombiner.cpp 2026-04-16
00:40:10.790771583 +0200
@@ -24,7 +24,7 @@
if (promise) {
query.promises.push_back(std::move(promise));
} else if (min_delay_ > 0 && !query.is_sent) {
- // if there is no promise, then noone waits for response
+ // if there is no promise, then no one waits for response
// we can delay query to not exceed any flood limit
if (query.send_query) {
// the query is already delayed
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/td-git20260406/td/telegram/Requests.cpp
new/td-git20260414/td/telegram/Requests.cpp
--- old/td-git20260406/td/telegram/Requests.cpp 2026-04-07 18:53:19.632979464
+0200
+++ new/td-git20260414/td/telegram/Requests.cpp 2026-04-16 00:40:10.792771502
+0200
@@ -120,6 +120,7 @@
#include "td/telegram/PasswordManager.h"
#include "td/telegram/Payments.h"
#include "td/telegram/PhoneNumberManager.h"
+#include "td/telegram/PollManager.h"
#include "td/telegram/Premium.h"
#include "td/telegram/PrivacyManager.h"
#include "td/telegram/PublicDialogType.h"
@@ -7780,35 +7781,35 @@
void Requests::on_request(uint64 id, td_api::addPollOption &request) {
CHECK_IS_USER();
CREATE_OK_REQUEST_PROMISE();
- td_->messages_manager_->add_poll_option({DialogId(request.chat_id_),
MessageId(request.message_id_)},
- std::move(request.option_),
std::move(promise));
+ td_->poll_manager_->add_poll_option({DialogId(request.chat_id_),
MessageId(request.message_id_)},
+ std::move(request.option_),
std::move(promise));
}
void Requests::on_request(uint64 id, const td_api::deletePollOption &request) {
CHECK_IS_USER();
CREATE_OK_REQUEST_PROMISE();
- td_->messages_manager_->delete_poll_option({DialogId(request.chat_id_),
MessageId(request.message_id_)},
- request.option_id_,
std::move(promise));
+ td_->poll_manager_->delete_poll_option({DialogId(request.chat_id_),
MessageId(request.message_id_)},
+ request.option_id_,
std::move(promise));
}
void Requests::on_request(uint64 id, td_api::setPollAnswer &request) {
CHECK_IS_USER();
CREATE_OK_REQUEST_PROMISE();
- td_->messages_manager_->set_poll_answer({DialogId(request.chat_id_),
MessageId(request.message_id_)},
- std::move(request.option_ids_),
std::move(promise));
+ td_->poll_manager_->set_poll_answer({DialogId(request.chat_id_),
MessageId(request.message_id_)},
+ std::move(request.option_ids_),
std::move(promise));
}
void Requests::on_request(uint64 id, const td_api::getPollVoters &request) {
CHECK_IS_USER();
CREATE_REQUEST_PROMISE();
- td_->messages_manager_->get_poll_voters({DialogId(request.chat_id_),
MessageId(request.message_id_)},
- request.option_id_, request.offset_,
request.limit_, std::move(promise));
+ td_->poll_manager_->get_poll_voters({DialogId(request.chat_id_),
MessageId(request.message_id_)}, request.option_id_,
+ request.offset_, request.limit_,
std::move(promise));
}
void Requests::on_request(uint64 id, td_api::stopPoll &request) {
CREATE_OK_REQUEST_PROMISE();
- td_->messages_manager_->stop_poll({DialogId(request.chat_id_),
MessageId(request.message_id_)},
- std::move(request.reply_markup_),
std::move(promise));
+ td_->poll_manager_->stop_poll({DialogId(request.chat_id_),
MessageId(request.message_id_)},
+ std::move(request.reply_markup_),
std::move(promise));
}
void Requests::on_request(uint64 id, td_api::addChecklistTasks &request) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/td-git20260406/td/telegram/TranslationManager.cpp
new/td-git20260414/td/telegram/TranslationManager.cpp
--- old/td-git20260406/td/telegram/TranslationManager.cpp 2026-04-07
18:53:19.639979180 +0200
+++ new/td-git20260414/td/telegram/TranslationManager.cpp 2026-04-16
00:40:10.800771178 +0200
@@ -89,10 +89,10 @@
: promise_(std::move(promise)) {
}
- void send(FormattedText &&text, const string &translate_to_language_code,
string tone, bool emojify,
- bool skip_bot_commands, int32 max_media_timestamp) {
- skip_bot_commands_ = skip_bot_commands;
- max_media_timestamp_ = max_media_timestamp;
+ void send(const TranslationManager::InputText &text, const string
&translate_to_language_code, string tone,
+ bool emojify) {
+ skip_bot_commands_ = text.skip_bot_commands_;
+ max_media_timestamp_ = text.max_media_timestamp_;
int32 flags = 0;
if (!translate_to_language_code.empty()) {
@@ -103,7 +103,7 @@
}
send_query(G()->net_query_creator().create(telegram_api::messages_composeMessageWithAI(
flags, false, emojify,
- get_input_text_with_entities(td_->user_manager_.get(),
std::move(text), "ComposeMessageWithAiQuery"),
+ get_input_text_with_entities(td_->user_manager_.get(), text.text_,
"ComposeMessageWithAiQuery"),
translate_to_language_code, tone)));
}
@@ -136,14 +136,14 @@
: promise_(std::move(promise)) {
}
- void send(FormattedText &&text, bool skip_bot_commands, int32
max_media_timestamp) {
- skip_bot_commands_ = skip_bot_commands;
- max_media_timestamp_ = max_media_timestamp;
+ void send(const TranslationManager::InputText &text) {
+ skip_bot_commands_ = text.skip_bot_commands_;
+ max_media_timestamp_ = text.max_media_timestamp_;
send_query(G()->net_query_creator().create(telegram_api::messages_composeMessageWithAI(
0, true, false,
- get_input_text_with_entities(td_->user_manager_.get(),
std::move(text), "ProofreadMessageWithAiQuery"),
- string(), string())));
+ get_input_text_with_entities(td_->user_manager_.get(), text.text_,
"ProofreadMessageWithAiQuery"), string(),
+ string())));
}
void on_result(BufferSlice packet) final {
@@ -190,14 +190,12 @@
}
}
-void
TranslationManager::translate_text(td_api::object_ptr<td_api::formattedText>
&&text,
- const string &to_language_code, const
string &tone,
-
Promise<td_api::object_ptr<td_api::formattedText>> &&promise) {
+Result<TranslationManager::InputText> TranslationManager::get_input_text(
+ td_api::object_ptr<td_api::formattedText> &&text) const {
if (text == nullptr) {
- return promise.set_error(400, "Text must be non-empty");
+ return Status::Error(400, "Text must be non-empty");
}
- bool skip_bot_commands = true;
- int32 max_media_timestamp = -1;
+ InputText input_text;
for (const auto &entity : text->entities_) {
if (entity == nullptr || entity->type_ == nullptr) {
continue;
@@ -205,11 +203,11 @@
switch (entity->type_->get_id()) {
case td_api::textEntityTypeBotCommand::ID:
- skip_bot_commands = false;
+ input_text.skip_bot_commands_ = false;
break;
case td_api::textEntityTypeMediaTimestamp::ID:
- max_media_timestamp =
- td::max(max_media_timestamp,
+ input_text.max_media_timestamp_ =
+ td::max(input_text.max_media_timestamp_,
static_cast<const td_api::textEntityTypeMediaTimestamp
*>(entity->type_.get())->media_timestamp_);
break;
default:
@@ -218,26 +216,32 @@
}
}
- TRY_RESULT_PROMISE(promise, entities,
get_message_entities(td_->user_manager_.get(), std::move(text->entities_)));
- TRY_STATUS_PROMISE(promise, fix_formatted_text(text->text_, entities, true,
true, true, true, true, true));
+ TRY_RESULT(entities, get_message_entities(td_->user_manager_.get(),
std::move(text->entities_)));
+ TRY_STATUS(fix_formatted_text(text->text_, entities, true, true, true, true,
true, true));
+ input_text.text_ = FormattedText{std::move(text->text_),
std::move(entities)};
+ return std::move(input_text);
+}
- translate_text(FormattedText{std::move(text->text_), std::move(entities)},
skip_bot_commands, max_media_timestamp,
- MessageFullId(), to_language_code, tone, std::move(promise));
+void
TranslationManager::translate_text(td_api::object_ptr<td_api::formattedText>
&&text,
+ const string &to_language_code, const
string &tone,
+
Promise<td_api::object_ptr<td_api::formattedText>> &&promise) {
+ TRY_RESULT_PROMISE(promise, input_text, get_input_text(std::move(text)));
+ translate_text(std::move(input_text), MessageFullId(), to_language_code,
tone, std::move(promise));
}
-void TranslationManager::translate_text(FormattedText text, bool
skip_bot_commands, int32 max_media_timestamp,
- MessageFullId message_full_id, const
string &to_language_code,
+void TranslationManager::translate_text(InputText &&text, MessageFullId
message_full_id, const string &to_language_code,
const string &tone,
Promise<td_api::object_ptr<td_api::formattedText>> &&promise) {
vector<FormattedText> texts;
- texts.push_back(std::move(text));
+ texts.push_back(std::move(text.text_));
if (tone != string() && tone != "formal" && tone != "neutral" && tone !=
"casual") {
return promise.set_error(400, "Invalid tone specified");
}
auto query_promise = PromiseCreator::lambda(
- [actor_id = actor_id(this), skip_bot_commands, max_media_timestamp,
promise = std::move(promise)](
+ [actor_id = actor_id(this), skip_bot_commands = text.skip_bot_commands_,
+ max_media_timestamp = text.max_media_timestamp_, promise =
std::move(promise)](
Result<vector<telegram_api::object_ptr<telegram_api::textWithEntities>>>
result) mutable {
if (result.is_error()) {
return promise.set_error(result.move_as_error());
@@ -270,71 +274,15 @@
const string
&translate_to_language_code, const string &tone,
bool emojify,
Promise<td_api::object_ptr<td_api::formattedText>> &&promise) {
- if (text == nullptr) {
- return promise.set_error(400, "Text must be non-empty");
- }
-
- bool skip_bot_commands = true;
- int32 max_media_timestamp = -1;
- for (const auto &entity : text->entities_) {
- if (entity == nullptr || entity->type_ == nullptr) {
- continue;
- }
-
- switch (entity->type_->get_id()) {
- case td_api::textEntityTypeBotCommand::ID:
- skip_bot_commands = false;
- break;
- case td_api::textEntityTypeMediaTimestamp::ID:
- max_media_timestamp =
- td::max(max_media_timestamp,
- static_cast<const td_api::textEntityTypeMediaTimestamp
*>(entity->type_.get())->media_timestamp_);
- break;
- default:
- // nothing to do
- break;
- }
- }
-
- TRY_RESULT_PROMISE(promise, entities,
get_message_entities(td_->user_manager_.get(), std::move(text->entities_)));
- TRY_STATUS_PROMISE(promise, fix_formatted_text(text->text_, entities, true,
true, true, true, true, true));
+ TRY_RESULT_PROMISE(promise, input_text, get_input_text(std::move(text)));
td_->create_handler<ComposeMessageWithAiQuery>(std::move(promise))
- ->send(FormattedText{std::move(text->text_), std::move(entities)},
translate_to_language_code, tone, emojify,
- skip_bot_commands, max_media_timestamp);
+ ->send(input_text, translate_to_language_code, tone, emojify);
}
void
TranslationManager::proofread_message_with_ai(td_api::object_ptr<td_api::formattedText>
&&text,
Promise<td_api::object_ptr<td_api::fixedText>> &&promise) {
- if (text == nullptr) {
- return promise.set_error(400, "Text must be non-empty");
- }
-
- bool skip_bot_commands = true;
- int32 max_media_timestamp = -1;
- for (const auto &entity : text->entities_) {
- if (entity == nullptr || entity->type_ == nullptr) {
- continue;
- }
-
- switch (entity->type_->get_id()) {
- case td_api::textEntityTypeBotCommand::ID:
- skip_bot_commands = false;
- break;
- case td_api::textEntityTypeMediaTimestamp::ID:
- max_media_timestamp =
- td::max(max_media_timestamp,
- static_cast<const td_api::textEntityTypeMediaTimestamp
*>(entity->type_.get())->media_timestamp_);
- break;
- default:
- // nothing to do
- break;
- }
- }
-
- TRY_RESULT_PROMISE(promise, entities,
get_message_entities(td_->user_manager_.get(), std::move(text->entities_)));
- TRY_STATUS_PROMISE(promise, fix_formatted_text(text->text_, entities, true,
true, true, true, true, true));
- td_->create_handler<ProofreadMessageWithAiQuery>(std::move(promise))
- ->send(FormattedText{std::move(text->text_), std::move(entities)},
skip_bot_commands, max_media_timestamp);
+ TRY_RESULT_PROMISE(promise, input_text, get_input_text(std::move(text)));
+
td_->create_handler<ProofreadMessageWithAiQuery>(std::move(promise))->send(input_text);
}
string TranslationManager::get_ai_compose_styles_key() {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/td-git20260406/td/telegram/TranslationManager.h
new/td-git20260414/td/telegram/TranslationManager.h
--- old/td-git20260406/td/telegram/TranslationManager.h 2026-04-07
18:53:19.639979180 +0200
+++ new/td-git20260414/td/telegram/TranslationManager.h 2026-04-16
00:40:10.800771178 +0200
@@ -15,6 +15,7 @@
#include "td/utils/common.h"
#include "td/utils/Promise.h"
+#include "td/utils/Status.h"
namespace td {
@@ -26,12 +27,17 @@
void on_authorization_success();
+ struct InputText {
+ FormattedText text_;
+ bool skip_bot_commands_ = true;
+ int32 max_media_timestamp_ = -1;
+ };
+
void translate_text(td_api::object_ptr<td_api::formattedText> &&text, const
string &to_language_code,
const string &tone,
Promise<td_api::object_ptr<td_api::formattedText>> &&promise);
- void translate_text(FormattedText text, bool skip_bot_commands, int32
max_media_timestamp,
- MessageFullId message_full_id, const string
&to_language_code, const string &tone,
- Promise<td_api::object_ptr<td_api::formattedText>>
&&promise);
+ void translate_text(InputText &&text, MessageFullId message_full_id, const
string &to_language_code,
+ const string &tone,
Promise<td_api::object_ptr<td_api::formattedText>> &&promise);
void compose_message_with_ai(td_api::object_ptr<td_api::formattedText>
&&text,
const string &translate_to_language_code, const
string &tone, bool emojify,
@@ -49,6 +55,8 @@
void tear_down() final;
+ Result<InputText> get_input_text(td_api::object_ptr<td_api::formattedText>
&&text) const;
+
void
on_get_translated_texts(vector<telegram_api::object_ptr<telegram_api::textWithEntities>>
texts,
bool skip_bot_commands, int32
max_media_timestamp,
Promise<td_api::object_ptr<td_api::formattedText>> &&promise);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/td-git20260406/tde2e/td/e2e/Call.cpp
new/td-git20260414/tde2e/td/e2e/Call.cpp
--- old/td-git20260406/tde2e/td/e2e/Call.cpp 2026-04-07 18:53:19.649214108
+0200
+++ new/td-git20260414/tde2e/td/e2e/Call.cpp 2026-04-16 00:40:10.810432724
+0200
@@ -62,17 +62,17 @@
return td::serialize(LambdaStorer<F>{std::forward<F>(f)});
}
-void CallVerificationChain::on_new_main_block(const Blockchain &blockhain) {
+void CallVerificationChain::on_new_main_block(const Blockchain &blockchain) {
state_ = Commit;
- CHECK(blockhain.get_height() > height_);
- height_ = td::narrow_cast<td::int32>(blockhain.get_height());
- last_block_hash_ = blockhain.last_block_hash_;
+ CHECK(blockchain.get_height() > height_);
+ height_ = td::narrow_cast<td::int32>(blockchain.get_height());
+ last_block_hash_ = blockchain.last_block_hash_;
verification_state_ = {};
verification_state_.height = height_;
verification_words_ =
CallVerificationWords{height_,
Mnemonic::generate_verification_words(last_block_hash_.as_slice())};
- auto &group_state = *blockhain.state_.group_state_;
+ auto &group_state = *blockchain.state_.group_state_;
committed_ = {};
revealed_ = {};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/td-git20260406/tde2e/td/e2e/Call.h
new/td-git20260414/tde2e/td/e2e/Call.h
--- old/td-git20260406/tde2e/td/e2e/Call.h 2026-04-07 18:53:19.649214108
+0200
+++ new/td-git20260414/tde2e/td/e2e/Call.h 2026-04-16 00:40:10.810432724
+0200
@@ -35,7 +35,7 @@
Reveal,
};
State get_state() const;
- void on_new_main_block(const Blockchain &blockhain);
+ void on_new_main_block(const Blockchain &blockchain);
td::Status try_apply_block(td::Slice message);
std::string to_short_string(e2e::object_ptr<e2e::e2e_chain_GroupBroadcast>
&broadcast);
@@ -139,7 +139,7 @@
class CallVerification {
public:
static CallVerification create(td::int64 user_id, PrivateKey private_key,
const Blockchain &blockchain);
- void on_new_main_block(const Blockchain &blockhain);
+ void on_new_main_block(const Blockchain &blockchain);
CallVerificationState get_verification_state() const;
std::vector<std::string> pull_outbound_messages();
CallVerificationWords get_verification_words() const;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/td-git20260406/tdutils/td/utils/Closure.h
new/td-git20260414/tdutils/td/utils/Closure.h
--- old/td-git20260406/tdutils/td/utils/Closure.h 2026-04-07
18:53:19.651952967 +0200
+++ new/td-git20260414/tdutils/td/utils/Closure.h 2026-04-16
00:40:10.813088191 +0200
@@ -46,7 +46,7 @@
// Tmp->Ref + / move->+
// Var->Val copy / copy->move
// Var->CnstRef + / copy->
-// Var->Ref + / copy->+ // khm. It will complile, but won't work
+// Var->Ref + / copy->+ // khm. It will compile, but won't work
//
// So I will use common idiom: forward references
// If delay is needed, just std::forward data to temporary storage, and
std::move them when call is executed.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/td-git20260406/tdutils/td/utils/port/Clocks.cpp
new/td-git20260414/tdutils/td/utils/port/Clocks.cpp
--- old/td-git20260406/tdutils/td/utils/port/Clocks.cpp 2026-04-07
18:53:19.653978611 +0200
+++ new/td-git20260414/tdutils/td/utils/port/Clocks.cpp 2026-04-16
00:40:10.814770611 +0200
@@ -92,7 +92,8 @@
}
namespace detail {
-int init_tz_offset_private = Clocks::tz_offset();
+// may cause static initialization order fiasco for some implementations of
std::localtime
+// int init_tz_offset_private = Clocks::tz_offset();
} // namespace detail
} // namespace td
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/td-git20260406/test/link.cpp
new/td-git20260414/test/link.cpp
--- old/td-git20260406/test/link.cpp 2026-04-07 18:53:19.658343118 +0200
+++ new/td-git20260414/test/link.cpp 2026-04-16 00:40:10.819868922 +0200
@@ -1349,6 +1349,16 @@
proxy_mtproto("google.com", 80, "7hI0VniQq83vEjRWeJCrze8BAQEBAQEBAQE"));
parse_internal_link("t.me/proxy?server=google.com&port=8%30&secret=7tAAAAAAAAAAAAAAAAAAAAAAAAcuZ29vZ2xlLmNvbQ",
proxy_mtproto("google.com", 80,
"7tAAAAAAAAAAAAAAAAAAAAAAAAcuZ29vZ2xlLmNvbQ"));
+ parse_internal_link(
+
"t.me/proxy?server=google.com&port=8%30&secret=7ge9Ug57SJOnMe8J%2BSj5pyZnaXRodWIuY29t",
+ proxy_mtproto("google.com", 80,
"7ge9Ug57SJOnMe8J-Sj5pyZnaXRodWIuY29t")); // invalid, but accepted
+ parse_internal_link(
+
"t.me/proxy?server=google.com&port=8%30&secret=7ge9Ug57SJOnMe8J%2FSj5pyZnaXRodWIuY29t",
+ proxy_mtproto("google.com", 80,
"7ge9Ug57SJOnMe8J_Sj5pyZnaXRodWIuY29t")); // invalid, but accepted
+
parse_internal_link("t.me/proxy?server=google.com&port=8%30&secret=7ge9Ug57SJOnMe8J-Sj5pyZnaXRodWIuY29t",
+ proxy_mtproto("google.com", 80,
"7ge9Ug57SJOnMe8J-Sj5pyZnaXRodWIuY29t"));
+
parse_internal_link("t.me/proxy?server=google.com&port=8%30&secret=7ge9Ug57SJOnMe8J_Sj5pyZnaXRodWIuY29t",
+ proxy_mtproto("google.com", 80,
"7ge9Ug57SJOnMe8J_Sj5pyZnaXRodWIuY29t"));
parse_internal_link("t.me/proxy", unsupported_proxy());
parse_internal_link("t.me/proxy?server=&port=80&secret=1234567890abcdef1234567890ABCDEF",
unsupported_proxy());
parse_internal_link("t.me/proxy?server=%FF&port=80&secret=1234567890abcdef1234567890ABCDEF",
unsupported_proxy());
++++++ tdesktop-6.7.5-full.tar.gz -> tdesktop-6.7.6-full.tar.gz ++++++
/work/SRC/openSUSE:Factory/telegram-desktop/tdesktop-6.7.5-full.tar.gz
/work/SRC/openSUSE:Factory/.telegram-desktop.new.11940/tdesktop-6.7.6-full.tar.gz
differ: char 5, line 1