From 8bb3b7fada37a018c31a35d17b1e79792da2e3ad Mon Sep 17 00:00:00 2001 From: John Preston Date: Thu, 1 Oct 2020 16:42:31 +0300 Subject: [PATCH] Handle some errors on comments open. Fixes #8682. --- Telegram/SourceFiles/window/window_session_controller.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Telegram/SourceFiles/window/window_session_controller.cpp b/Telegram/SourceFiles/window/window_session_controller.cpp index 57028d65ec..4f8ebf3a3c 100644 --- a/Telegram/SourceFiles/window/window_session_controller.cpp +++ b/Telegram/SourceFiles/window/window_session_controller.cpp @@ -38,6 +38,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "ui/layers/generic_box.h" #include "ui/text/text_utilities.h" #include "ui/delayed_activation.h" +#include "ui/toast/toast.h" #include "boxes/calendar_box.h" #include "boxes/sticker_set_box.h" // requestAttachedStickerSets. #include "boxes/confirm_box.h" // requestAttachedStickerSets. @@ -321,6 +322,10 @@ void SessionNavigation::showRepliesForMessage( }); }).fail([=](const RPCError &error) { _showingRepliesRequestId = 0; + if (error.type() == u"CHANNEL_PRIVATE"_q + || error.type() == u"USER_BANNED_IN_CHANNEL"_q) { + Ui::Toast::Show(tr::lng_group_not_accessible(tr::now)); + } }).send(); }