diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl index 8f503d5ec..7f6513c6d 100644 --- a/td/generate/scheme/td_api.tl +++ b/td/generate/scheme/td_api.tl @@ -2022,28 +2022,43 @@ searchMessagesFilterPinned = SearchMessagesFilter; //@description The user is typing a message chatActionTyping = ChatAction; + //@description The user is recording a video chatActionRecordingVideo = ChatAction; + //@description The user is uploading a video @progress Upload progress, as a percentage chatActionUploadingVideo progress:int32 = ChatAction; + //@description The user is recording a voice note chatActionRecordingVoiceNote = ChatAction; + //@description The user is uploading a voice note @progress Upload progress, as a percentage chatActionUploadingVoiceNote progress:int32 = ChatAction; + //@description The user is uploading a photo @progress Upload progress, as a percentage chatActionUploadingPhoto progress:int32 = ChatAction; + //@description The user is uploading a document @progress Upload progress, as a percentage chatActionUploadingDocument progress:int32 = ChatAction; + +//@description The user is picking a sticker to send +chatActionChoosingSticker = ChatAction; + //@description The user is picking a location or venue to send chatActionChoosingLocation = ChatAction; + //@description The user is picking a contact to send chatActionChoosingContact = ChatAction; + //@description The user has started to play a game chatActionStartPlayingGame = ChatAction; + //@description The user is recording a video note chatActionRecordingVideoNote = ChatAction; + //@description The user is uploading a video note @progress Upload progress, as a percentage chatActionUploadingVideoNote progress:int32 = ChatAction; + //@description The user has canceled the previous action chatActionCancel = ChatAction; diff --git a/td/telegram/DialogAction.cpp b/td/telegram/DialogAction.cpp index 8865c0c64..235c2c02f 100644 --- a/td/telegram/DialogAction.cpp +++ b/td/telegram/DialogAction.cpp @@ -79,6 +79,9 @@ DialogAction::DialogAction(tl_object_ptr &&action) { init(Type::UploadingVideoNote, uploading_action->progress_); break; } + case td_api::chatActionChoosingSticker::ID: + init(Type::ChoosingSticker); + break; default: UNREACHABLE(); break; @@ -144,6 +147,9 @@ DialogAction::DialogAction(tl_object_ptr &&acti init(Type::ImportingMessages, history_import_action->progress_); break; } + case telegram_api::sendMessageChooseStickerAction::ID: + init(Type::ChoosingSticker); + break; default: UNREACHABLE(); break; @@ -182,6 +188,8 @@ tl_object_ptr DialogAction::get_input_send_mess return make_tl_object(); case Type::ImportingMessages: return make_tl_object(progress_); + case Type::ChoosingSticker: + return make_tl_object(); default: UNREACHABLE(); return nullptr; @@ -220,6 +228,8 @@ tl_object_ptr DialogAction::get_secret_input_send return make_tl_object(); case Type::ImportingMessages: return make_tl_object(); + case Type::ChoosingSticker: + return make_tl_object(); default: UNREACHABLE(); return nullptr; @@ -254,6 +264,8 @@ tl_object_ptr DialogAction::get_chat_action_object() const { return td_api::make_object(); case Type::UploadingVideoNote: return td_api::make_object(progress_); + case Type::ChoosingSticker: + return td_api::make_object(); case Type::ImportingMessages: case Type::SpeakingInVoiceChat: default: @@ -293,9 +305,10 @@ bool DialogAction::is_canceled_by_message_of_type(MessageContentType message_con case MessageContentType::Location: case MessageContentType::Venue: return type_ == Type::ChoosingLocation; + case MessageContentType::Sticker: + return type_ == Type::ChoosingSticker; case MessageContentType::Game: case MessageContentType::Invoice: - case MessageContentType::Sticker: case MessageContentType::Text: case MessageContentType::Unsupported: case MessageContentType::ChatCreate: @@ -400,6 +413,8 @@ StringBuilder &operator<<(StringBuilder &string_builder, const DialogAction &act return "SpeakingInVoiceChat"; case DialogAction::Type::ImportingMessages: return "ImportingMessages"; + case DialogAction::Type::ChoosingSticker: + return "ChoosingSticker"; default: UNREACHABLE(); return "Cancel"; diff --git a/td/telegram/DialogAction.h b/td/telegram/DialogAction.h index ee073cf82..9b7962fe3 100644 --- a/td/telegram/DialogAction.h +++ b/td/telegram/DialogAction.h @@ -32,7 +32,8 @@ class DialogAction { RecordingVideoNote, UploadingVideoNote, SpeakingInVoiceChat, - ImportingMessages + ImportingMessages, + ChoosingSticker }; Type type_ = Type::Cancel; int32 progress_ = 0; diff --git a/td/telegram/cli.cpp b/td/telegram/cli.cpp index c99e5fe02..d76946fa2 100644 --- a/td/telegram/cli.cpp +++ b/td/telegram/cli.cpp @@ -1319,6 +1319,9 @@ class CliClient final : public Actor { if (action == "uvn" || action == "upload_video_note") { return td_api::make_object(50); } + if (action == "cs" || action == "choose_sticker") { + return td_api::make_object(); + } return td_api::make_object(); }