-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net-im/telegram-desktop (and friends): bump
Signed-off-by: Vadim Misbakh-Soloviov <[email protected]>
- Loading branch information
Showing
13 changed files
with
174 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
DIST libsrtp-2.5.0.tar.gz 638704 BLAKE2B e944e506de22e5aa6574b548bc7f63a9e0544dd5c44be2111d5250c1a5600c07960eb5d423a8100c6788b7db201f946a40396b61f82d3c9f24cd9d3bce753f37 SHA512 bd679ab65ccf22ca30fe867b9649a0b84cfa6fad6e22eb10f081141632f6dd56479a04d525b865f11fd46007303ca211065d9c170e4820d6ea7055403702340a | ||
DIST tg_owt-0_pre20230428.tar.gz 13725816 BLAKE2B c854de42696e397ea7101b7536f940c5424ebeae4105b84c9d3ef39242409b450e3cf38b7319ede7eb185667b78f4d4fb72c046880495f300205dff4d553be3a SHA512 883be1ba54db10462dadf0ef0e03270535972eed37d7fec745bd660faa67eabc539bfa88122a9c64a895cba97fb1d1a67ff6ee590ad002480ad327736f07284e | ||
DIST tg_owt-0_pre20231007.tar.gz 13726037 BLAKE2B 635342dd2127330542374e2f0f9acee91844c3c825fe4610dabe2996c541d9b3dc1681999910e5b591752f7e8f65a089c16b43216dd0c0b84f1a0e913e5a0213 SHA512 538d713e9ac91e9f676cdf301d11d7b5be0d67bda6283537e03b6322f3cca5c0234ff2f2b0b23e9046709f77ed282fc4d3526d3b21ee93478c50380be410372f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
138 changes: 138 additions & 0 deletions
138
...es/0/conditional/tdesktop_patches_hide-banned/0000_hide-messages-from-blocked-users.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
diff -ru a/Telegram/SourceFiles/history/history_item_components.cpp b/Telegram/SourceFiles/history/history_item_components.cpp | ||
--- a/Telegram/SourceFiles/history/history_item_components.cpp 1970-01-01 06:00:00.000000000 +0600 | ||
+++ b/Telegram/SourceFiles/history/history_item_components.cpp 2023-09-22 19:55:06.414790851 +0600 | ||
@@ -552,7 +552,10 @@ | ||
const auto pausedSpoiler = context.paused | ||
|| On(PowerSaving::kChatSpoiler); | ||
if (w > st::msgReplyBarSkip) { | ||
- if (replyToMsg || replyToStory) { | ||
+ auto blocked = replyToMsg | ||
+ && replyToMsg->from()->isUser() | ||
+ && replyToMsg->from()->asUser()->isBlocked(); | ||
+ if ((replyToMsg && (!blocked)) || replyToStory) { | ||
const auto media = replyToMsg ? replyToMsg->media() : nullptr; | ||
auto hasPreview = (replyToStory && replyToStory->hasReplyPreview()) || (media && media->hasReplyPreview()); | ||
if (hasPreview && w < st::msgReplyBarSkip + st::msgReplyBarSize.height()) { | ||
@@ -645,7 +648,10 @@ | ||
} | ||
|
||
QString HistoryMessageReply::statePhrase() const { | ||
- return (replyToMsgId || replyToStoryId) | ||
+ auto blocked = replyToMsg | ||
+ && replyToMsg->from()->isUser() | ||
+ && replyToMsg->from()->asUser()->isBlocked(); | ||
+ return ((replyToMsgId && (!blocked)) || replyToStoryId) | ||
? tr::lng_profile_loading(tr::now) | ||
: storyReply | ||
? tr::lng_deleted_story(tr::now) | ||
diff -ru a/Telegram/SourceFiles/history/history_widget.cpp b/Telegram/SourceFiles/history/history_widget.cpp | ||
--- a/Telegram/SourceFiles/history/history_widget.cpp 1970-01-01 06:00:00.000000000 +0600 | ||
+++ b/Telegram/SourceFiles/history/history_widget.cpp 2023-09-22 20:00:03.007374659 +0600 | ||
@@ -829,6 +829,21 @@ | ||
} | ||
}, lifetime()); | ||
|
||
+ session().changes().peerUpdates( | ||
+ Data::PeerUpdate::Flag::IsBlocked | ||
+ ) | rpl::start_with_next([=] { | ||
+ crl::on_main(this, [=] { | ||
+ if (_history) { | ||
+ _history->forceFullResize(); | ||
+ if (_migrated) { | ||
+ _migrated->forceFullResize(); | ||
+ } | ||
+ updateHistoryGeometry(); | ||
+ update(); | ||
+ } | ||
+ }); | ||
+ }, lifetime()); | ||
+ | ||
_topBar->membersShowAreaActive( | ||
) | rpl::start_with_next([=](bool active) { | ||
setMembersShowAreaActive(active); | ||
diff -ru a/Telegram/SourceFiles/history/view/history_view_element.cpp b/Telegram/SourceFiles/history/view/history_view_element.cpp | ||
--- a/Telegram/SourceFiles/history/view/history_view_element.cpp 1970-01-01 06:00:00.000000000 +0600 | ||
+++ b/Telegram/SourceFiles/history/view/history_view_element.cpp 2023-09-22 20:01:58.251711974 +0600 | ||
@@ -42,6 +42,7 @@ | ||
#include "ui/item_text_options.h" | ||
#include "ui/painter.h" | ||
#include "data/data_session.h" | ||
+#include "data/data_user.h" | ||
#include "data/data_groups.h" | ||
#include "data/data_forum.h" | ||
#include "data/data_forum_topic.h" | ||
@@ -611,6 +612,10 @@ | ||
} | ||
|
||
bool Element::isHidden() const { | ||
+ if (data()->from()->isUser() | ||
+ && data()->from()->asUser()->isBlocked()) { | ||
+ return true; | ||
+ } | ||
return isHiddenByGroup(); | ||
} | ||
|
||
diff -ru a/Telegram/SourceFiles/main/main_session.cpp b/Telegram/SourceFiles/main/main_session.cpp | ||
--- a/Telegram/SourceFiles/main/main_session.cpp 1970-01-01 06:00:00.000000000 +0600 | ||
+++ b/Telegram/SourceFiles/main/main_session.cpp 2023-09-22 20:03:45.975983794 +0600 | ||
@@ -11,6 +11,7 @@ | ||
#include "api/api_updates.h" | ||
#include "api/api_send_progress.h" | ||
#include "api/api_user_privacy.h" | ||
+#include "api/api_blocked_peers.h" | ||
#include "main/main_account.h" | ||
#include "main/main_domain.h" | ||
#include "main/main_session_settings.h" | ||
@@ -74,6 +75,43 @@ | ||
return MTP::ConfigFields().internalLinksDomain; | ||
} | ||
|
||
+void InitializeBlockedPeers(not_null<Main::Session*> session) { | ||
+ const auto offset = std::make_shared<int>(0); | ||
+ const auto allLoaded = std::make_shared<bool>(false); | ||
+ const auto applySlice = [=]( | ||
+ const Api::BlockedPeers::Slice &slice, | ||
+ auto self) -> void { | ||
+ if (slice.list.empty()) { | ||
+ *allLoaded = true; | ||
+ } | ||
+ | ||
+ *offset += slice.list.size(); | ||
+ for (const auto &item : slice.list) { | ||
+ if (const auto peer = session->data().peerLoaded(item.id)) { | ||
+ peer->setIsBlocked(true); | ||
+ } | ||
+ } | ||
+ if (*offset >= slice.total) { | ||
+ *allLoaded = true; | ||
+ } | ||
+ | ||
+ if (!*allLoaded) { | ||
+ session->api().blockedPeers().request( | ||
+ *offset, | ||
+ [=](const Api::BlockedPeers::Slice &slice) { | ||
+ self(slice, self); | ||
+ }); | ||
+ } | ||
+ }; | ||
+ | ||
+ session->api().blockedPeers().slice( | ||
+ ) | rpl::take( | ||
+ 1 | ||
+ ) | rpl::start_with_next([=](const Api::BlockedPeers::Slice &result) { | ||
+ applySlice(result, applySlice); | ||
+ }, session->lifetime()); | ||
+} | ||
+ | ||
} // namespace | ||
|
||
Session::Session( | ||
@@ -181,6 +219,7 @@ | ||
_api->requestNotifySettings(MTP_inputNotifyChats()); | ||
_api->requestNotifySettings(MTP_inputNotifyBroadcasts()); | ||
|
||
+ InitializeBlockedPeers(this); | ||
Core::App().downloadManager().trackSession(this); | ||
} | ||
|
||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 4 additions & 3 deletions
7
.../patches/0/conditional/tdesktop_patches_wide-baloons/0000_exploit_through_monospace.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
--- a/Telegram/lib_ui/ui/text/text.cpp 2021-03-03 03:13:31.095340596 +0700 | ||
+++ b/Telegram/lib_ui/ui/text/text.cpp 2021-03-03 03:14:44.720811463 +0700 | ||
@@ -2791,10 +2791,6 @@ int String::countMaxMonospaceWidth() con | ||
@@ -340,10 +340,6 @@ int String::countMaxMonospaceWidth() con | ||
_width = (b->f_width() - last_rBearing); | ||
continue; | ||
} | ||
- if (!(b->flags() & (TextBlockFPre | TextBlockFCode)) | ||
- && (b->type() != TextBlockTSkip)) { | ||
- if (!(b->flags() & (TextBlockFlag::Pre | TextBlockFlag::Code)) | ||
- && (b->type() != TextBlockType::Skip)) { | ||
- fullMonospace = false; | ||
- } | ||
auto b__f_rbearing = b->f_rbearing(); // cache | ||
|
||
// We need to accumulate max width after each block, because | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters