diff --git a/Telegram/Resources/langs/lang.strings b/Telegram/Resources/langs/lang.strings index c9cb6f254..78e4b709a 100644 --- a/Telegram/Resources/langs/lang.strings +++ b/Telegram/Resources/langs/lang.strings @@ -2238,13 +2238,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL "ktg_pinned_message_show" = "Show pinned message"; "ktg_pinned_message_hide" = "Hide pinned message"; -"ktg_restricted_send_message_until" = "The admins of this group restricted you from writing here until {date}, {time}."; -"ktg_restricted_send_media_until" = "The admins of this group restricted you from posting media content here until {date}, {time}."; -"ktg_restricted_send_stickers_until" = "The admins of this group restricted you from posting stickers here until {date}, {time}."; -"ktg_restricted_send_gifs_until" = "The admins of this group restricted you from posting GIFs here until {date}, {time}."; -"ktg_restricted_send_inline_until" = "The admins of this group restricted you from posting inline content here until {date}, {time}."; -"ktg_restricted_send_polls_until" = "The admins of this group restricted you from posting polls here until {date}, {time}."; - "ktg_settings_show_json_settings" = "Show custom settings"; "ktg_settings_restart" = "Restart Kotatogram"; diff --git a/Telegram/SourceFiles/data/data_peer.cpp b/Telegram/SourceFiles/data/data_peer.cpp index 1375ad56f..6c6610f8b 100644 --- a/Telegram/SourceFiles/data/data_peer.cpp +++ b/Telegram/SourceFiles/data/data_peer.cpp @@ -757,37 +757,6 @@ std::optional RestrictionError( using Flag = ChatRestriction; if (const auto restricted = peer->amRestricted(restriction)) { const auto all = restricted.isWithEveryone(); - const auto channel = peer->asChannel(); - if (!all && channel) { - auto restrictedUntil = channel->restrictedUntil(); - if (restrictedUntil > 0 && !ChannelData::IsRestrictedForever(restrictedUntil)) { - auto restrictedUntilDateTime = base::unixtime::parse(channel->restrictedUntil()); - auto date = restrictedUntilDateTime.toString(qsl("d.MM.yy")); - auto time = restrictedUntilDateTime.toString(cTimeFormat()); - - switch (restriction) { - case Flag::f_send_polls: - return tr::ktg_restricted_send_polls_until( - tr::now, lt_date, date, lt_time, time); - case Flag::f_send_messages: - return tr::ktg_restricted_send_message_until( - tr::now, lt_date, date, lt_time, time); - case Flag::f_send_media: - return tr::ktg_restricted_send_media_until( - tr::now, lt_date, date, lt_time, time); - case Flag::f_send_stickers: - return tr::ktg_restricted_send_stickers_until( - tr::now, lt_date, date, lt_time, time); - case Flag::f_send_gifs: - return tr::ktg_restricted_send_gifs_until( - tr::now, lt_date, date, lt_time, time); - case Flag::f_send_inline: - case Flag::f_send_games: - return tr::ktg_restricted_send_inline_until( - tr::now, lt_date, date, lt_time, time); - } - } - } switch (restriction) { case Flag::f_send_polls: return all