Add suggestedActionSeeTicksHint.

This commit is contained in:
levlam 2021-01-15 01:30:05 +03:00
parent 1941c0b962
commit dda1b62655
5 changed files with 17 additions and 2 deletions

View File

@ -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;

Binary file not shown.

View File

@ -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<td_api::SuggestedA
return SuggestedAction::EnableArchiveAndMuteNewChats;
case td_api::suggestedActionCheckPhoneNumber::ID:
return SuggestedAction::CheckPhoneNumber;
case td_api::suggestedActionSeeTicksHint::ID:
return SuggestedAction::SeeTicksHint;
default:
UNREACHABLE();
return SuggestedAction::Empty;
@ -47,6 +54,8 @@ td_api::object_ptr<td_api::SuggestedAction> get_suggested_action_object(Suggeste
return td_api::make_object<td_api::suggestedActionEnableArchiveAndMuteNewChats>();
case SuggestedAction::CheckPhoneNumber:
return td_api::make_object<td_api::suggestedActionCheckPhoneNumber>();
case SuggestedAction::SeeTicksHint:
return td_api::make_object<td_api::suggestedActionSeeTicksHint>();
default:
UNREACHABLE();
return nullptr;

View File

@ -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);

View File

@ -1364,6 +1364,9 @@ class CliClient final : public Actor {
if (action == "number") {
return td_api::make_object<td_api::suggestedActionCheckPhoneNumber>();
}
if (action == "ticks") {
return td_api::make_object<td_api::suggestedActionSeeTicksHint>();
}
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<td_api::getStatisticalGraph>(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<td_api::hideSuggestedAction>(as_suggested_action(args)));
} else if (op == "glui" || op == "glu" || op == "glua") {
string chat_id;