diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl index 1346e9e4b..618e03545 100644 --- a/td/generate/scheme/td_api.tl +++ b/td/generate/scheme/td_api.tl @@ -3094,6 +3094,9 @@ suggestedActionEnableArchiveAndMuteNewChats = SuggestedAction; //@description Suggests the user to check authorization phone number and change the phone number if it is inaccessible suggestedActionCheckPhoneNumber = SuggestedAction; +//@description Suggests the user to see a hint about meaning of one and two ticks on sent message +suggestedActionSeeTicksHint = SuggestedAction; + //@description Contains a counter @count Count count count:int32 = Count; diff --git a/td/generate/scheme/td_api.tlo b/td/generate/scheme/td_api.tlo index 45a58fda1..dd7540b5c 100644 Binary files a/td/generate/scheme/td_api.tlo and b/td/generate/scheme/td_api.tlo differ diff --git a/td/telegram/SuggestedAction.cpp b/td/telegram/SuggestedAction.cpp index dea54ca2a..93c892997 100644 --- a/td/telegram/SuggestedAction.cpp +++ b/td/telegram/SuggestedAction.cpp @@ -12,6 +12,9 @@ SuggestedAction get_suggested_action(Slice action_str) { if (action_str == Slice("AUTOARCHIVE_POPULAR")) { return SuggestedAction::EnableArchiveAndMuteNewChats; } + if (action_str == Slice("NEWCOMER_TICKS")) { + return SuggestedAction::SeeTicksHint; + } return SuggestedAction::Empty; } @@ -19,6 +22,8 @@ string get_suggested_action_str(SuggestedAction action) { switch (action) { case SuggestedAction::EnableArchiveAndMuteNewChats: return "AUTOARCHIVE_POPULAR"; + case SuggestedAction::SeeTicksHint: + return "NEWCOMER_TICKS"; default: return string(); } @@ -33,6 +38,8 @@ SuggestedAction get_suggested_action(const td_api::object_ptr get_suggested_action_object(Suggeste return td_api::make_object(); case SuggestedAction::CheckPhoneNumber: return td_api::make_object(); + case SuggestedAction::SeeTicksHint: + return td_api::make_object(); default: UNREACHABLE(); return nullptr; diff --git a/td/telegram/SuggestedAction.h b/td/telegram/SuggestedAction.h index d588c6b6c..13607948a 100644 --- a/td/telegram/SuggestedAction.h +++ b/td/telegram/SuggestedAction.h @@ -13,7 +13,7 @@ namespace td { -enum class SuggestedAction : int32 { Empty, EnableArchiveAndMuteNewChats, CheckPhoneNumber }; +enum class SuggestedAction : int32 { Empty, EnableArchiveAndMuteNewChats, CheckPhoneNumber, SeeTicksHint }; SuggestedAction get_suggested_action(Slice action_str); diff --git a/td/telegram/cli.cpp b/td/telegram/cli.cpp index 0b7efc4e3..c8c9a8e53 100644 --- a/td/telegram/cli.cpp +++ b/td/telegram/cli.cpp @@ -1364,6 +1364,9 @@ class CliClient final : public Actor { if (action == "number") { return td_api::make_object(); } + if (action == "ticks") { + return td_api::make_object(); + } return nullptr; } @@ -3882,7 +3885,7 @@ class CliClient final : public Actor { int64 x; get_args(args, chat_id, token, x); send_request(td_api::make_object(as_chat_id(chat_id), token, x)); - } else if (op == "hsa" || op == "glu" || op == "glua") { + } else if (op == "hsa") { send_request(td_api::make_object(as_suggested_action(args))); } else if (op == "glui" || op == "glu" || op == "glua") { string chat_id;