From 8298caddc34d926ed7462b6601bffc919e83fca7 Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Thu, 23 Jan 2020 10:43:52 +0300 Subject: [PATCH] Removing scheduling messages until online for those who hide their online. --- .../SourceFiles/history/view/history_view_schedule_box.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/history/view/history_view_schedule_box.cpp b/Telegram/SourceFiles/history/view/history_view_schedule_box.cpp index 36fb6d0b6..d543948b7 100644 --- a/Telegram/SourceFiles/history/view/history_view_schedule_box.cpp +++ b/Telegram/SourceFiles/history/view/history_view_schedule_box.cpp @@ -563,7 +563,10 @@ TimeId DefaultScheduleTime() { } bool CanScheduleUntilOnline(not_null peer) { - return !peer->isSelf() && peer->isUser() && !peer->asUser()->isBot(); + return !peer->isSelf() + && peer->isUser() + && !peer->asUser()->isBot() + && (peer->asUser()->onlineTill > 0); } void ScheduleBox(