From 3d4ae6e26ccb55b353a326aca571c5d96165aab1 Mon Sep 17 00:00:00 2001 From: levlam Date: Fri, 6 Dec 2019 04:43:21 +0300 Subject: [PATCH] tg_cli: null message scheduling state by default. GitOrigin-RevId: 26c144a4a5ce7ab12dc0a6de2556f567301b6b1c --- td/telegram/cli.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/td/telegram/cli.cpp b/td/telegram/cli.cpp index 70359264d..7aaa78bdf 100644 --- a/td/telegram/cli.cpp +++ b/td/telegram/cli.cpp @@ -1242,6 +1242,9 @@ class CliClient final : public Actor { static td_api::object_ptr as_message_scheduling_state(Slice date) { date = trim(date); + if (date.empty()) { + return nullptr; + } auto send_date = to_integer(date); if (send_date == -1) { return td_api::make_object();