Remove chatActionImportingMessages.
This commit is contained in:
parent
ef59e47807
commit
d648ce0b69
@ -1971,8 +1971,6 @@ chatActionStartPlayingGame = ChatAction;
|
||||
chatActionRecordingVideoNote = ChatAction;
|
||||
//@description The user is uploading a video note @progress Upload progress, as a percentage
|
||||
chatActionUploadingVideoNote progress:int32 = ChatAction;
|
||||
//@description The user is importing message history. This action is sent automatically and can't be explicitly sent @progress Import progress, as a percentage
|
||||
chatActionImportingMessages progress:int32 = ChatAction;
|
||||
//@description The user has cancelled the previous action
|
||||
chatActionCancel = ChatAction;
|
||||
|
||||
|
Binary file not shown.
@ -79,9 +79,6 @@ DialogAction::DialogAction(tl_object_ptr<td_api::ChatAction> &&action) {
|
||||
init(Type::UploadingVideoNote, uploading_action->progress_);
|
||||
break;
|
||||
}
|
||||
case td_api::chatActionImportingMessages::ID:
|
||||
init(Type::Cancel); // it can't be sent explicitly
|
||||
break;
|
||||
default:
|
||||
UNREACHABLE();
|
||||
break;
|
||||
@ -258,7 +255,6 @@ tl_object_ptr<td_api::ChatAction> DialogAction::get_chat_action_object() const {
|
||||
case Type::UploadingVideoNote:
|
||||
return td_api::make_object<td_api::chatActionUploadingVideoNote>(progress_);
|
||||
case Type::ImportingMessages:
|
||||
return td_api::make_object<td_api::chatActionImportingMessages>(progress_);
|
||||
case Type::SpeakingInVoiceChat:
|
||||
default:
|
||||
UNREACHABLE();
|
||||
@ -363,6 +359,13 @@ DialogAction DialogAction::get_speaking_action() {
|
||||
return DialogAction(Type::SpeakingInVoiceChat, 0);
|
||||
}
|
||||
|
||||
int32 DialogAction::get_importing_messages_action_progress() const {
|
||||
if (type_ != Type::ImportingMessages) {
|
||||
return -1;
|
||||
}
|
||||
return progress_;
|
||||
}
|
||||
|
||||
StringBuilder &operator<<(StringBuilder &string_builder, const DialogAction &action) {
|
||||
string_builder << "ChatAction";
|
||||
const char *type = [action_type = action.type_] {
|
||||
|
@ -64,6 +64,8 @@ class DialogAction {
|
||||
|
||||
static DialogAction get_speaking_action();
|
||||
|
||||
int32 get_importing_messages_action_progress() const;
|
||||
|
||||
friend bool operator==(const DialogAction &lhs, const DialogAction &rhs) {
|
||||
return lhs.type_ == rhs.type_ && lhs.progress_ == rhs.progress_;
|
||||
}
|
||||
|
@ -7056,6 +7056,13 @@ void MessagesManager::on_user_dialog_action(DialogId dialog_id, MessageId top_th
|
||||
}
|
||||
return;
|
||||
}
|
||||
{
|
||||
auto message_import_progress = action.get_importing_messages_action_progress();
|
||||
if (message_import_progress >= 0) {
|
||||
// TODO
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (!td_->contacts_manager_->have_min_user(user_id)) {
|
||||
LOG(DEBUG) << "Ignore typing of unknown " << user_id;
|
||||
|
@ -1312,9 +1312,6 @@ class CliClient final : public Actor {
|
||||
if (action == "uvn" || action == "upload_video_note") {
|
||||
return td_api::make_object<td_api::chatActionUploadingVideoNote>(50);
|
||||
}
|
||||
if (action == "im" || action == "import_messages") {
|
||||
return td_api::make_object<td_api::chatActionImportingMessages>(50);
|
||||
}
|
||||
return td_api::make_object<td_api::chatActionTyping>();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user