diff --git a/Telegram/CMakeLists.txt b/Telegram/CMakeLists.txt index 7fb918eedb4ec..8c3a3252b3827 100644 --- a/Telegram/CMakeLists.txt +++ b/Telegram/CMakeLists.txt @@ -105,13 +105,15 @@ if (WIN32) ${src_loc}/cloudveil/sentry/release/breakpad_client.lib ${src_loc}/cloudveil/sentry/release/sentry.lib ) + target_compile_definitions(Telegram PRIVATE DESKTOP_APP_USE_SENTRY=1) elseif (APPLE) target_link_libraries(Telegram PRIVATE curl - ${src_loc}/cloudveil/sentry/release/libbreakpad_client.a - ${src_loc}/cloudveil/sentry/release/libsentry.a + ${src_loc}/cloudveil/sentry/release_mac/libbreakpad_client.a + ${src_loc}/cloudveil/sentry/release_mac/libsentry.a ) + target_compile_definitions(Telegram PRIVATE DESKTOP_APP_USE_SENTRY=1) endif() target_precompile_headers(Telegram PRIVATE $<$:${src_loc}/stdafx.h>) @@ -1893,15 +1895,15 @@ if (build_macstore) ) else() if (CMAKE_GENERATOR STREQUAL Xcode) - set(bundle_identifier "com.tdesktop.Telegram$<$:Debug>") + set(bundle_identifier "org.cloudveil.desktopmessenger$<$:Debug>") else() - set(bundle_identifier "com.tdesktop.Telegram") + set(bundle_identifier "org.cloudveil.desktopmessenger") endif() set(bundle_entitlements "Telegram.entitlements") if (LINUX AND DESKTOP_APP_USE_PACKAGED) - set(output_name "telegram-desktop") + set(output_name "cloudveil-messenger") else() - set(output_name "Telegram") + set(output_name "CloudVeil Messenger") endif() endif() @@ -2042,21 +2044,21 @@ endif() if (LINUX AND DESKTOP_APP_USE_PACKAGED) include(GNUInstallDirs) - configure_file("../lib/xdg/org.telegram.desktop.service" "${CMAKE_CURRENT_BINARY_DIR}/org.telegram.desktop.service" @ONLY) - configure_file("../lib/xdg/org.telegram.desktop.metainfo.xml" "${CMAKE_CURRENT_BINARY_DIR}/org.telegram.desktop.metainfo.xml" @ONLY) - generate_appdata_changelog(Telegram "${CMAKE_SOURCE_DIR}/changelog.txt" "${CMAKE_CURRENT_BINARY_DIR}/org.telegram.desktop.metainfo.xml") + configure_file("../lib/xdg/org.cloudveil.messenger.service" "${CMAKE_CURRENT_BINARY_DIR}/org.cloudveil.messenger.service" @ONLY) + configure_file("../lib/xdg/org.cloudveil.messenger.metainfo.xml" "${CMAKE_CURRENT_BINARY_DIR}/org.cloudveil.messenger.metainfo.xml" @ONLY) + generate_appdata_changelog(Telegram "${CMAKE_SOURCE_DIR}/changelog.txt" "${CMAKE_CURRENT_BINARY_DIR}/org.cloudveil.messenger.metainfo.xml") install(TARGETS Telegram RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" BUNDLE DESTINATION "${CMAKE_INSTALL_BINDIR}") - install(FILES "Resources/art/icon16.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/16x16/apps" RENAME "org.telegram.desktop.png") - install(FILES "Resources/art/icon32.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/32x32/apps" RENAME "org.telegram.desktop.png") - install(FILES "Resources/art/icon48.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/48x48/apps" RENAME "org.telegram.desktop.png") - install(FILES "Resources/art/icon64.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/64x64/apps" RENAME "org.telegram.desktop.png") - install(FILES "Resources/art/icon128.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/128x128/apps" RENAME "org.telegram.desktop.png") - install(FILES "Resources/art/icon256.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/256x256/apps" RENAME "org.telegram.desktop.png") - install(FILES "Resources/art/icon512.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/512x512/apps" RENAME "org.telegram.desktop.png") - install(FILES "Resources/icons/tray_monochrome.svg" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/symbolic/apps" RENAME "org.telegram.desktop-symbolic.svg") - install(FILES "Resources/icons/tray_monochrome_attention.svg" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/symbolic/apps" RENAME "org.telegram.desktop-attention-symbolic.svg") - install(FILES "Resources/icons/tray_monochrome_mute.svg" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/symbolic/apps" RENAME "org.telegram.desktop-mute-symbolic.svg") - install(FILES "../lib/xdg/org.telegram.desktop.desktop" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications") - install(FILES "${CMAKE_CURRENT_BINARY_DIR}/org.telegram.desktop.service" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/dbus-1/services") - install(FILES "${CMAKE_CURRENT_BINARY_DIR}/org.telegram.desktop.metainfo.xml" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/metainfo") + install(FILES "Resources/art/icon16.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/16x16/apps" RENAME "org.cloudveil.messenger.png") + install(FILES "Resources/art/icon32.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/32x32/apps" RENAME "org.cloudveil.messenger.png") + install(FILES "Resources/art/icon48.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/48x48/apps" RENAME "org.cloudveil.messenger.png") + install(FILES "Resources/art/icon64.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/64x64/apps" RENAME "org.cloudveil.messenger.png") + install(FILES "Resources/art/icon128.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/128x128/apps" RENAME "org.cloudveil.messenger.png") + install(FILES "Resources/art/icon256.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/256x256/apps" RENAME "org.cloudveil.messenger.png") + install(FILES "Resources/art/icon512.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/512x512/apps" RENAME "org.cloudveil.messenger.png") + install(FILES "Resources/icons/tray_monochrome.svg" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/symbolic/apps" RENAME "org.cloudveil.messenger-symbolic.svg") + install(FILES "Resources/icons/tray_monochrome_attention.svg" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/symbolic/apps" RENAME "org.cloudveil.messenger-attention-symbolic.svg") + install(FILES "Resources/icons/tray_monochrome_mute.svg" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/symbolic/apps" RENAME "org.cloudveil.messenger-mute-symbolic.svg") + install(FILES "../lib/xdg/org.cloudveil.messenger.desktop" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications") + install(FILES "${CMAKE_CURRENT_BINARY_DIR}/org.cloudveil.messenger.service" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/dbus-1/services") + install(FILES "${CMAKE_CURRENT_BINARY_DIR}/org.cloudveil.messenger.metainfo.xml" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/metainfo") endif() diff --git a/Telegram/Resources/qrc/telegram/telegram.qrc b/Telegram/Resources/qrc/telegram/telegram.qrc index e439a4e012e8b..4a6123ecf8648 100644 --- a/Telegram/Resources/qrc/telegram/telegram.qrc +++ b/Telegram/Resources/qrc/telegram/telegram.qrc @@ -54,6 +54,6 @@ ../../default_shortcuts-custom.json - ../../../../lib/xdg/org.telegram.desktop.desktop + ../../../../lib/xdg/org.cloudveil.messenger.desktop diff --git a/Telegram/Resources/uwp/AppX/AppxManifest.xml b/Telegram/Resources/uwp/AppX/AppxManifest.xml index 0510faaad41f3..c2009094ccfc3 100644 --- a/Telegram/Resources/uwp/AppX/AppxManifest.xml +++ b/Telegram/Resources/uwp/AppX/AppxManifest.xml @@ -10,7 +10,7 @@ + Version="5.14.4.0" /> Telegram Desktop Telegram Messenger LLP diff --git a/Telegram/Resources/winrc/Telegram.rc b/Telegram/Resources/winrc/Telegram.rc index 8a9b1153e95cc..a63215b32ca74 100644 --- a/Telegram/Resources/winrc/Telegram.rc +++ b/Telegram/Resources/winrc/Telegram.rc @@ -62,10 +62,10 @@ BEGIN BEGIN VALUE "CompanyName", "CloudVeil" VALUE "FileDescription", "CloudVeil Messenger Desktop" - VALUE "FileVersion", "5.14.3.0" + VALUE "FileVersion", "5.14.4.0" VALUE "LegalCopyright", "Copyright (C) 2014-2025" VALUE "ProductName", "CloudVeil Messenger Desktop" - VALUE "ProductVersion", "5.14.3.0" + VALUE "ProductVersion", "5.14.4.0" END END BLOCK "VarFileInfo" diff --git a/Telegram/Resources/winrc/Updater.rc b/Telegram/Resources/winrc/Updater.rc index 2b9ca0953141e..c52896bf4d804 100644 --- a/Telegram/Resources/winrc/Updater.rc +++ b/Telegram/Resources/winrc/Updater.rc @@ -53,10 +53,10 @@ BEGIN BEGIN VALUE "CompanyName", "Telegram FZ-LLC" VALUE "FileDescription", "Telegram Desktop Updater" - VALUE "FileVersion", "5.14.3.0" + VALUE "FileVersion", "5.14.4.0" VALUE "LegalCopyright", "Copyright (C) 2014-2025" VALUE "ProductName", "Telegram Desktop" - VALUE "ProductVersion", "5.14.3.0" + VALUE "ProductVersion", "5.14.4.0" END END BLOCK "VarFileInfo" diff --git a/Telegram/SourceFiles/cloudveil/DialogHelper.cpp b/Telegram/SourceFiles/cloudveil/DialogHelper.cpp index 69c44e414d45a..3ecb6618d143f 100644 --- a/Telegram/SourceFiles/cloudveil/DialogHelper.cpp +++ b/Telegram/SourceFiles/cloudveil/DialogHelper.cpp @@ -7,6 +7,9 @@ DialogHelper::CheckDialogResult DialogHelper::checkAndShowDialogForbidden(PeerData* peerData, UserData* userData, Window::SessionController *controller) { if (!GlobalSecuritySettings::getSettings().isDialogAllowed(peerData)) { + if (controller) { + controller->closeThirdSection(); + } // Kenji: this line below makes the user lose the current view context // It usually opens the first chat or the saved chat, so I commented it out. // controller->showPeerHistory(userData->id); diff --git a/Telegram/SourceFiles/cloudveil/GlobalSecuritySettings.cpp b/Telegram/SourceFiles/cloudveil/GlobalSecuritySettings.cpp index e2718d27551ac..7b7ca7b8ba1a5 100644 --- a/Telegram/SourceFiles/cloudveil/GlobalSecuritySettings.cpp +++ b/Telegram/SourceFiles/cloudveil/GlobalSecuritySettings.cpp @@ -190,6 +190,7 @@ void GlobalSecuritySettings::addDialogToRequest(SettingsRequest &request, PeerDa SettingsRequest::Row row; row.isMegagroup = false; row.isPublic = false; + row.migratedFromTelegramId = 0; // peer->usernames() will internally handle the underlying user/channel/chat object. std::vector userNames = peer->usernames(); diff --git a/Telegram/SourceFiles/cloudveil/SimpleUpdater.cpp b/Telegram/SourceFiles/cloudveil/SimpleUpdater.cpp index 201f69761887a..df204a87b4b9b 100644 --- a/Telegram/SourceFiles/cloudveil/SimpleUpdater.cpp +++ b/Telegram/SourceFiles/cloudveil/SimpleUpdater.cpp @@ -109,7 +109,13 @@ void SimpleUpdater::processDownloadedResponse(QNetworkReply* networkReply) { downloadedFile.close(); } +#ifdef Q_OS_WIN QString path = QDir::tempPath() + "/cvm_update_package.exe"; +#elif defined(Q_OS_MAC) + QString path = QDir::tempPath() + "/cvm_update_package.dmg"; +#else + QString path = QDir::tempPath() + "/cvm_update_package"; +#endif downloadedFile.setFileName(path); if (QFile::exists(path)) { downloadedFile.remove(); diff --git a/Telegram/SourceFiles/cloudveil/request/SettingsRequest.h b/Telegram/SourceFiles/cloudveil/request/SettingsRequest.h index 4607ef2b7a534..c5d4e99180ecd 100644 --- a/Telegram/SourceFiles/cloudveil/request/SettingsRequest.h +++ b/Telegram/SourceFiles/cloudveil/request/SettingsRequest.h @@ -8,7 +8,7 @@ class SettingsRequest QStringList userNames; bool isMegagroup; bool isPublic; - qint64 migratedFromTelegramId; + qint64 migratedFromTelegramId = 0; void writeToJson(QJsonObject &json, bool writeIsMegagroup = false, bool writeIsPublic=false); bool equalsTo(Row& r); @@ -20,6 +20,8 @@ class SettingsRequest QStringList userNames; #ifdef __APPLE__ QString clientOsType = "macOS"; +#elif defined(__linux__) + QString clientOsType = "Linux"; #else QString clientOsType = "Windows"; #endif diff --git a/Telegram/SourceFiles/core/version.h b/Telegram/SourceFiles/core/version.h index e9e3ad07daabd..deb9a828b4908 100644 --- a/Telegram/SourceFiles/core/version.h +++ b/Telegram/SourceFiles/core/version.h @@ -23,6 +23,6 @@ constexpr auto AppNameOld = "CloudVeil Messenger Win (Unofficial)"_cs; constexpr auto AppName = "CloudVeil Messenger Desktop"_cs; constexpr auto AppFile = "Telegram"_cs; constexpr auto AppVersion = 5014003; -constexpr auto AppVersionStr = "5.14.3"; +constexpr auto AppVersionStr = "5.14.4"; constexpr auto AppBetaVersion = false; constexpr auto AppAlphaVersion = TDESKTOP_ALPHA_VERSION; diff --git a/Telegram/SourceFiles/data/data_search_controller.cpp b/Telegram/SourceFiles/data/data_search_controller.cpp index 4a2418eb9dcf7..3cd8742231768 100644 --- a/Telegram/SourceFiles/data/data_search_controller.cpp +++ b/Telegram/SourceFiles/data/data_search_controller.cpp @@ -15,6 +15,9 @@ For license and copyright information please follow this link: #include "history/history.h" #include "history/history_item.h" #include "apiwrap.h" +// CloudVeil start +#include "cloudveil/GlobalSecuritySettings.h" +// CloudVeil end namespace Api { namespace { @@ -122,7 +125,11 @@ GlobalMediaResult ParseGlobalMediaResult( message, MessageFlags(), addType); - if (item) { + // CloudVeil start: disable search results for blocked chats + if (item + && GlobalSecuritySettings::getSettings().isDialogAllowed( + item->history()->peer)) { + // CloudVeil end result.messageIds.push_back(item->position()); } } diff --git a/Telegram/SourceFiles/dialogs/dialogs_inner_widget.cpp b/Telegram/SourceFiles/dialogs/dialogs_inner_widget.cpp index 69af47335f76b..190f41196ef5a 100644 --- a/Telegram/SourceFiles/dialogs/dialogs_inner_widget.cpp +++ b/Telegram/SourceFiles/dialogs/dialogs_inner_widget.cpp @@ -61,6 +61,9 @@ For license and copyright information please follow this link: #include "mainwidget.h" #include "storage/storage_account.h" #include "apiwrap.h" +// CloudVeil start +#include "cloudveil/GlobalSecuritySettings.h" +// CloudVeil end #include "main/main_session.h" #include "main/main_session_settings.h" #include "menu/menu_sponsored.h" @@ -3425,11 +3428,18 @@ void InnerWidget::applySearchState(SearchState state) { const auto append = [&](not_null list) { const auto results = list->filtered(words); auto top = filteredHeight(); - auto i = _filterResults.insert( - end(_filterResults), - begin(results), - end(results)); - for (const auto e = end(_filterResults); i != e; ++i) { + // CloudVeil start: disable search results for blocked chats + for (const auto &row : results) { + if (const auto history = row->history()) { + if (!GlobalSecuritySettings::getSettings() + .isDialogAllowed(history->peer)) { + continue; + } + } + auto i = _filterResults.insert( + end(_filterResults), + FilterResult(row)); + // CloudVeil end i->top = top; i->row->recountHeight(_narrowRatio, _filterId); top += i->row->height(); @@ -3812,7 +3822,11 @@ void InnerWidget::searchReceived( : Key(_openedForum->history()); if (inject && (!_searchState.inChat - || inject->history() == _searchState.inChat.history())) { + // CloudVeil start: disable search results for blocked chats + || inject->history() == _searchState.inChat.history()) + && GlobalSecuritySettings::getSettings().isDialogAllowed( + inject->history()->peer)) { + // CloudVeil end Assert(_searchResults.empty()); Assert(!toPreview); const auto index = int(_searchResults.size()); @@ -3827,6 +3841,12 @@ void InnerWidget::searchReceived( auto &results = toPreview ? _previewResults : _searchResults; for (const auto &item : messages) { const auto history = item->history(); + // CloudVeil start: disable search results for blocked chats + if (!GlobalSecuritySettings::getSettings().isDialogAllowed( + history->peer)) { + continue; + } + // CloudVeil end if (toPreview || !uniquePeers || !hasHistoryInResults(history)) { const auto index = int(results.size()); const auto repaint = toPreview diff --git a/Telegram/SourceFiles/dialogs/dialogs_widget.cpp b/Telegram/SourceFiles/dialogs/dialogs_widget.cpp index 4f5d7f0f3b6e1..bb777f7078f76 100644 --- a/Telegram/SourceFiles/dialogs/dialogs_widget.cpp +++ b/Telegram/SourceFiles/dialogs/dialogs_widget.cpp @@ -82,6 +82,10 @@ For license and copyright information please follow this link: #include "data/data_stories.h" #include "info/downloads/info_downloads_widget.h" #include "info/info_memento.h" +//CloudVeil start +#include "cloudveil/DialogHelper.h" +#include "cloudveil/GlobalSecuritySettings.h" +//CloudVeil end #include "inline_bots/bot_attach_web_view.h" #include "styles/style_dialogs.h" #include "styles/style_chat.h" @@ -1787,6 +1791,13 @@ void Widget::updateSuggestions(anim::type animated) { } void Widget::openBotMainApp(not_null bot) { + // CloudVeil start: disable mini-app for blocked bots + if (DialogHelper::CheckDialogResult::APPROVED + != DialogHelper::checkAndShowDialogForbidden( + bot, session().user(), controller())) { + return; + } + // CloudVeil end session().attachWebView().open({ .bot = bot, .context = { @@ -2994,7 +3005,11 @@ void Widget::searchReceived( const auto peerId = PeerFromMessage(message); const auto lastDate = DateFromMessage(message); if (const auto peer = session().data().peerLoaded(peerId)) { - if (lastDate) { + // CloudVeil start: disable search results for blocked chats + if (lastDate + && GlobalSecuritySettings::getSettings().isDialogAllowed( + peer)) { + // CloudVeil end const auto item = session().data().addNewMessage( message, MessageFlags(), diff --git a/Telegram/SourceFiles/dialogs/ui/dialogs_suggestions.cpp b/Telegram/SourceFiles/dialogs/ui/dialogs_suggestions.cpp index ae4a4768cd857..c4f3d0e9f743b 100644 --- a/Telegram/SourceFiles/dialogs/ui/dialogs_suggestions.cpp +++ b/Telegram/SourceFiles/dialogs/ui/dialogs_suggestions.cpp @@ -55,6 +55,10 @@ For license and copyright information please follow this link: #include "ui/unread_badge_paint.h" #include "ui/ui_utility.h" #include "window/window_separate_id.h" +// CloudVeil start +#include "cloudveil/DialogHelper.h" +#include "cloudveil/GlobalSecuritySettings.h" +// CloudVeil end #include "window/window_session_controller.h" #include "window/window_peer_menu.h" #include "styles/style_chat.h" @@ -955,9 +959,13 @@ void MyChannelsController::prepare() { const auto add = [&](not_null list) { for (const auto &row : list->indexed()->all()) { if (const auto history = row->history()) { - if (history->peer->isBroadcast()) { + // CloudVeil start: hide blocked channels in suggestion list + if (history->peer->isBroadcast() + && GlobalSecuritySettings::getSettings().isDialogAllowed( + history->peer)) { _channels.push_back(history); } + // CloudVeil end } } }; @@ -984,11 +992,14 @@ void MyChannelsController::prepare() { const auto list = owner->chatsList(folder); for (const auto &row : list->indexed()->all()) { if (const auto history = row->history()) { - if (history->peer->isBroadcast()) { - if (ranges::contains(_channels, not_null(history))) { - _channels.push_back(history); - } + // CloudVeil start: hide blocked channels in suggestion list + if (history->peer->isBroadcast() + && !ranges::contains(_channels, not_null(history)) + && GlobalSecuritySettings::getSettings().isDialogAllowed( + history->peer)) { + _channels.push_back(history); } + // CloudVeil end } } const auto was = countCurrent(); @@ -1078,6 +1089,9 @@ void RecommendationsController::load() { void RecommendationsController::fill() { const auto participants = &session().api().chatParticipants(); const auto &list = participants->recommendations().list; + // CloudVeil start: hide recommendations + return; + // CloudVeil end if (list.empty()) { return; } @@ -2054,7 +2068,9 @@ std::vector Suggestions::TabKeysFor( auto result = std::vector{ { Tab::Chats }, { Tab::Channels }, - { Tab::Apps }, + // CloudVeil start: hide Apps tab + //{ Tab::Apps }, + // CloudVeil end { Tab::Media, MediaType::Photo }, { Tab::Media, MediaType::Video }, { Tab::Downloads }, @@ -2674,6 +2690,15 @@ object_ptr StarsExamplesBox( if (const auto user = peer->asUser()) { if (const auto info = user->botInfo.get()) { if (info->hasMainApp) { + // CloudVeil start: disable mini-app for blocked bots + if (DialogHelper::CheckDialogResult::APPROVED + != DialogHelper::checkAndShowDialogForbidden( + user, + window->session().user(), + window)) { + return; + } + // CloudVeil end window->session().attachWebView().open({ .bot = user, .context = { diff --git a/Telegram/SourceFiles/history/view/history_view_top_bar_widget.cpp b/Telegram/SourceFiles/history/view/history_view_top_bar_widget.cpp index c4548ee4bf289..886f431af9bd7 100644 --- a/Telegram/SourceFiles/history/view/history_view_top_bar_widget.cpp +++ b/Telegram/SourceFiles/history/view/history_view_top_bar_widget.cpp @@ -60,6 +60,9 @@ For license and copyright information please follow this link: #include "support/support_helper.h" #include "apiwrap.h" #include "api/api_chat_participants.h" +// CloudVeil start +#include "cloudveil/GlobalSecuritySettings.h" +// CloudVeil end #include "styles/style_window.h" #include "styles/style_dialogs.h" #include "styles/style_chat.h" @@ -382,6 +385,12 @@ void TopBarWidget::toggleInfoSection() { || Core::App().settings().tabbedReplacedWithInfo())) { _controller->closeThirdSection(); } else if (_activeChat.key.peer()) { + // CloudVeil start: disable side panel for blocked chats + if (!GlobalSecuritySettings::getSettings().isDialogAllowed( + _activeChat.key.peer())) { + return; + } + // CloudVeil end if (_controller->canShowThirdSection()) { Core::App().settings().setThirdSectionInfoEnabled(true); Core::App().saveSettingsDelayed(); @@ -736,7 +745,14 @@ void TopBarWidget::infoClicked() { const auto key = _activeChat.key; if (!key) { return; - } else if (const auto topic = key.topic()) { + // CloudVeil start: disable side panel for blocked chats + } + if (const auto peer = key.peer(); + peer && !GlobalSecuritySettings::getSettings().isDialogAllowed(peer)) { + return; + } + if (const auto topic = key.topic()) { + // CloudVeil end _controller->showSection(std::make_shared(topic)); } else if ([[maybe_unused]] const auto sublist = key.sublist()) { _controller->showSection(std::make_shared( diff --git a/Telegram/SourceFiles/main.cpp b/Telegram/SourceFiles/main.cpp index 5c86a5d731d0c..b8d6b9275fa62 100644 --- a/Telegram/SourceFiles/main.cpp +++ b/Telegram/SourceFiles/main.cpp @@ -10,7 +10,7 @@ For license and copyright information please follow this link: //CloudVeil end #include "core/launcher.h" //CloudVeil start -#ifndef _DEBUG +#if defined(DESKTOP_APP_USE_SENTRY) && !defined(_DEBUG) #include "cloudveil/sentry/include/sentry.h" #endif //CloudVeil end @@ -18,7 +18,7 @@ For license and copyright information please follow this link: int main(int argc, char *argv[]) { //CloudVeil start -#ifndef _DEBUG +#if defined(DESKTOP_APP_USE_SENTRY) && !defined(_DEBUG) sentry_options_t * options = sentry_options_new(); #ifdef __APPLE__ sentry_options_set_dsn(options, "https://5c646a91dfb14b52a08d37dc6c72e045@o1077369.ingest.sentry.io/6130964"); @@ -31,9 +31,9 @@ int main(int argc, char *argv[]) { const auto launcher = Core::Launcher::Create(argc, argv); auto res = launcher ? launcher->exec() : 1; -#ifndef _DEBUG +#if defined(DESKTOP_APP_USE_SENTRY) && !defined(_DEBUG) sentry_close(); -#endif // !DEBUG +#endif //CloudVeil end diff --git a/Telegram/SourceFiles/platform/linux/specific_linux.cpp b/Telegram/SourceFiles/platform/linux/specific_linux.cpp index dcbefc2ae5461..5d054ecf107db 100644 --- a/Telegram/SourceFiles/platform/linux/specific_linux.cpp +++ b/Telegram/SourceFiles/platform/linux/specific_linux.cpp @@ -374,6 +374,10 @@ bool GenerateDesktopFile( hashMd5Hex(d.constData(), d.size(), md5Hash); if (!Core::Launcher::Instance().customWorkingDir()) { + QFile::remove(u"%1org.cloudveil.messenger._%2.desktop"_q.arg( + targetPath, + md5Hash)); + // Also remove old Telegram desktop file for migration QFile::remove(u"%1org.telegram.desktop._%2.desktop"_q.arg( targetPath, md5Hash)); @@ -383,6 +387,10 @@ bool GenerateDesktopFile( hashMd5Hex(exePath.constData(), exePath.size(), md5Hash); } + QFile::remove(u"%1org.cloudveil.messenger.%2.desktop"_q.arg( + targetPath, + md5Hash)); + // Also remove old Telegram desktop file for migration QFile::remove(u"%1org.telegram.desktop.%2.desktop"_q.arg( targetPath, md5Hash)); @@ -442,6 +450,10 @@ bool GenerateServiceFile(bool silent = false) { const auto d = QFile::encodeName(QDir(cWorkingDir()).absolutePath()); hashMd5Hex(d.constData(), d.size(), md5Hash); + QFile::remove(u"%1org.cloudveil.messenger._%2.service"_q.arg( + targetPath, + md5Hash)); + // Also remove old Telegram service file for migration QFile::remove(u"%1org.telegram.desktop._%2.service"_q.arg( targetPath, md5Hash)); @@ -690,11 +702,11 @@ void start() { } if (!Core::UpdaterDisabled()) { - return u"org.telegram.desktop._%1"_q.arg( + return u"org.cloudveil.messenger._%1"_q.arg( Core::Launcher::Instance().instanceHash().constData()); } - return u"org.telegram.desktop"_q; + return u"org.cloudveil.messenger"_q; }()); LOG(("App ID: %1").arg(QGuiApplication::desktopFileName())); diff --git a/Telegram/SourceFiles/platform/mac/main_window_mac.mm b/Telegram/SourceFiles/platform/mac/main_window_mac.mm index 8dfc16425a424..e32e0df69fec9 100644 --- a/Telegram/SourceFiles/platform/mac/main_window_mac.mm +++ b/Telegram/SourceFiles/platform/mac/main_window_mac.mm @@ -375,7 +375,9 @@ QString strNotificationAboutScreenUnlocked() { tr::lng_mac_menu_about_telegram( tr::now, lt_telegram, - u"Telegram"_q), + // CloudVeil start + AppName.utf16()), + // CloudVeil end std::move(callback)) ->setMenuRole(QAction::AboutQtRole); } diff --git a/Telegram/SourceFiles/window/notifications_manager_default.cpp b/Telegram/SourceFiles/window/notifications_manager_default.cpp index d62bc78a2f646..dfb522e3cedfe 100644 --- a/Telegram/SourceFiles/window/notifications_manager_default.cpp +++ b/Telegram/SourceFiles/window/notifications_manager_default.cpp @@ -233,7 +233,7 @@ void Manager::showNextFromQueue() { subscribeToSession(&queued.history->session()); //CloudVeil start - if (!GlobalSecuritySettings::getSettings().isDialogAllowed(queued.peer)) { + if (GlobalSecuritySettings::getSettings().isDialogAllowed(queued.peer)) { _notifications.push_back(std::make_unique( this, queued.history, diff --git a/Telegram/Telegram.plist b/Telegram/Telegram.plist index 72913e85e2edd..0833e5e37e838 100644 --- a/Telegram/Telegram.plist +++ b/Telegram/Telegram.plist @@ -5,7 +5,7 @@ CFBundleExecutable @output_name@ CFBundleGetInfoString - Telegram Desktop messaging app + CloudVeil Messenger CFBundleIconFile Icon.icns CFBundleIconName @@ -16,6 +16,8 @@ 6.0 CFBundleName @output_name@ + CFBundleDisplayName + CloudVeil Messenger CFBundlePackageType APPL CFBundleShortVersionString diff --git a/Telegram/Telegram/Images.xcassets/AppIcon.appiconset/Contents.json b/Telegram/Telegram/Images.xcassets/AppIcon.appiconset/Contents.json index 77ffe7cf85d38..3ee3f0d2fa9a6 100644 --- a/Telegram/Telegram/Images.xcassets/AppIcon.appiconset/Contents.json +++ b/Telegram/Telegram/Images.xcassets/AppIcon.appiconset/Contents.json @@ -31,7 +31,7 @@ "size" : "128x128" }, { - "filename" : "icon-256x256.png", + "filename" : "icon-256x256 1.png", "idiom" : "mac", "scale" : "2x", "size" : "128x128" diff --git a/Telegram/build/docker/centos_env/Dockerfile b/Telegram/build/docker/centos_env/Dockerfile index 9c57f1cd1c52a..22779248effe0 100644 --- a/Telegram/build/docker/centos_env/Dockerfile +++ b/Telegram/build/docker/centos_env/Dockerfile @@ -29,7 +29,8 @@ RUN dnf -y install epel-release \ glib2-devel at-spi2-core-devel gtk3-devel boost1.78-devel fmt-devel \ && dnf clean all -RUN python3 -m pip install meson ninja +RUN python3.11 -m pip install meson ninja +RUN alternatives --set python3 /usr/bin/python3.11 2>/dev/null || ln -sf /usr/bin/python3.11 /usr/local/bin/python3 RUN sed -i '/Requires.private: valgrind/d' /usr/lib64/pkgconfig/libdrm.pc RUN echo set debuginfod enabled on > /opt/rh/{{ TOOLSET }}/root/etc/gdbinit.d/00-debuginfod.gdb RUN adduser user @@ -285,7 +286,8 @@ RUN git clone -b master --depth=1 {{ GIT }}/desktop-app/rnnoise.git \ FROM builder AS xcb-proto RUN git clone -b xcb-proto-1.16.0 --depth=1 {{ GIT_FREEDESKTOP }}/xcbproto.git \ && cd xcbproto \ - && ./autogen.sh \ + && PYTHON=python3.11 ./autogen.sh \ + && PYTHON=python3.11 ./configure \ && make -j$(nproc) \ && make DESTDIR="{{ LibrariesPath }}/xcb-proto-cache" install \ && cd .. \ @@ -623,7 +625,7 @@ RUN git clone -b 0.3.62 --depth=1 {{ GIT }}/PipeWire/pipewire.git \ --buildtype=plain \ -Dtests=disabled \ -Dexamples=disabled \ - -Dsession-managers=media-session \ + -Dsession-managers= \ -Dspa-plugins=disabled \ && meson compile -C build \ && DESTDIR="{{ LibrariesPath }}/pipewire-cache" meson install -C build \ @@ -695,7 +697,7 @@ COPY --link --from=glib {{ LibrariesPath }}/glib-cache / RUN git clone -b 1.78.1 --depth=1 {{ GIT }}/GNOME/gobject-introspection.git \ && cd gobject-introspection \ - && meson build --buildtype=plain \ + && meson build --buildtype=plain -Dpython=python3.11 \ && meson compile -C build \ && DESTDIR="{{ LibrariesPath }}/gobject-introspection-cache" meson install -C build \ && cd .. \ diff --git a/Telegram/build/setup.iss b/Telegram/build/setup.iss index a8b6f6bfa10b2..ca1ddac17cbcc 100644 --- a/Telegram/build/setup.iss +++ b/Telegram/build/setup.iss @@ -7,8 +7,8 @@ #define CurrentYear GetDateTimeString('yyyy','','') #define MyBuildTarget "win64" -#define MyAppVersion "5.14.3" -#define MyAppVersionFull "5.14.3" +#define MyAppVersion "5.14.4" +#define MyAppVersionFull "5.14.4" #define ReleasePath "..\..\out\Release" [Setup] diff --git a/Telegram/build/version b/Telegram/build/version index af8ef69b2cacb..6b15c4b5eea28 100644 --- a/Telegram/build/version +++ b/Telegram/build/version @@ -1,7 +1,7 @@ -AppVersion 5014003 +AppVersion 5014004 AppVersionStrMajor 5.14 -AppVersionStrSmall 5.14.3 -AppVersionStr 5.14.3 +AppVersionStrSmall 5.14.4 +AppVersionStr 5.14.4 BetaChannel 0 AlphaVersion 0 -AppVersionOriginal 5.14.3 +AppVersionOriginal 5.14.4 diff --git a/docs/cvm_create_mac_dmg.md b/docs/cvm_create_mac_dmg.md index febc83cee7bf1..50875d05a5fa4 100644 --- a/docs/cvm_create_mac_dmg.md +++ b/docs/cvm_create_mac_dmg.md @@ -20,4 +20,9 @@ create-dmg \ --app-drop-link 660 260 \ "cvm_macos_4010009.dmg" \ "CVM/" -``` \ No newline at end of file +``` + +Note: if you get an error, try using terminal app. +Make sure Grant Automation permission (most common cause on macOS 13+) + +Go to System Settings → Privacy & Security → Automation, find your terminal app (Terminal, iTerm2, etc.) and enable the Finder toggle. Then re-run the command. \ No newline at end of file diff --git a/lib/xdg/org.telegram.desktop.desktop b/lib/xdg/org.cloudveil.messenger.desktop similarity index 79% rename from lib/xdg/org.telegram.desktop.desktop rename to lib/xdg/org.cloudveil.messenger.desktop index 365516b4dd817..696cc8e3de159 100644 --- a/lib/xdg/org.telegram.desktop.desktop +++ b/lib/xdg/org.cloudveil.messenger.desktop @@ -1,9 +1,9 @@ [Desktop Entry] -Name=Telegram -Comment=New era of messaging +Name=CloudVeil Messenger +Comment=Secure messaging with CloudVeil TryExec=telegram-desktop Exec=telegram-desktop -- %u -Icon=org.telegram.desktop +Icon=org.cloudveil.messenger Terminal=false StartupWMClass=TelegramDesktop Type=Application @@ -18,5 +18,5 @@ X-GNOME-SingleWindow=true [Desktop Action quit] Exec=telegram-desktop -quit -Name=Quit Telegram +Name=Quit CloudVeil Messenger Icon=application-exit diff --git a/lib/xdg/org.telegram.desktop.metainfo.xml b/lib/xdg/org.cloudveil.messenger.metainfo.xml similarity index 92% rename from lib/xdg/org.telegram.desktop.metainfo.xml rename to lib/xdg/org.cloudveil.messenger.metainfo.xml index bc93de9015845..89c48c3931e38 100644 --- a/lib/xdg/org.telegram.desktop.metainfo.xml +++ b/lib/xdg/org.cloudveil.messenger.metainfo.xml @@ -1,10 +1,10 @@ - org.telegram.desktop + org.cloudveil.messenger CC0-1.0 GPL-3.0 - Telegram - New era of messaging + CloudVeil Messenger + Secure messaging with CloudVeil

Pure instant messaging — simple, fast, secure, and synced across all your devices. One of the world's top 10 most downloaded apps with over 500 million active users.

FAST: Telegram is the fastest messaging app on the market, connecting people via a unique, distributed network of data centers around the globe.

@@ -23,11 +23,11 @@ Network InstantMessaging - Telegram FZ-LLC - https://desktop.telegram.org/ - https://github.com/telegramdesktop/tdesktop/issues + CloudVeil + https://messenger.cloudveil.org/ + https://github.com/cloudveiltech/tdesktop/issues https://translations.telegram.org/ - https://github.com/telegramdesktop/tdesktop/blob/dev/.github/CONTRIBUTING.md + https://github.com/cloudveiltech/tdesktop/blob/dev/.github/CONTRIBUTING.md #edf0f2 #2d363f @@ -104,10 +104,10 @@ none moderate - org.telegram.desktop.desktop + org.cloudveil.messenger.desktop telegram-desktop - org.telegram.desktop + org.cloudveil.messenger x-scheme-handler/tg x-scheme-handler/tonsite diff --git a/lib/xdg/org.telegram.desktop.service b/lib/xdg/org.cloudveil.messenger.service similarity index 69% rename from lib/xdg/org.telegram.desktop.service rename to lib/xdg/org.cloudveil.messenger.service index 525cac208cf3a..cea9c67e47db2 100644 --- a/lib/xdg/org.telegram.desktop.service +++ b/lib/xdg/org.cloudveil.messenger.service @@ -1,3 +1,3 @@ [D-BUS Service] -Name=org.telegram.desktop +Name=org.cloudveil.messenger Exec=@CMAKE_INSTALL_FULL_BINDIR@/telegram-desktop