Add SpeakingInCall chat action.
This commit is contained in:
parent
ccb0a4f63c
commit
905aa871e1
@ -1931,6 +1931,8 @@ chatActionStartPlayingGame = ChatAction;
|
|||||||
chatActionRecordingVideoNote = ChatAction;
|
chatActionRecordingVideoNote = ChatAction;
|
||||||
//@description The user is uploading a video note @progress Upload progress, as a percentage
|
//@description The user is uploading a video note @progress Upload progress, as a percentage
|
||||||
chatActionUploadingVideoNote progress:int32 = ChatAction;
|
chatActionUploadingVideoNote progress:int32 = ChatAction;
|
||||||
|
//@description The user is speaking in a call; supergroups only
|
||||||
|
chatActionSpeakingInCall = ChatAction;
|
||||||
//@description The user has cancelled the previous action
|
//@description The user has cancelled the previous action
|
||||||
chatActionCancel = ChatAction;
|
chatActionCancel = ChatAction;
|
||||||
|
|
||||||
|
Binary file not shown.
@ -80,6 +80,9 @@ DialogAction::DialogAction(tl_object_ptr<td_api::ChatAction> &&action) {
|
|||||||
init(Type::UploadingVideoNote, uploading_action->progress_);
|
init(Type::UploadingVideoNote, uploading_action->progress_);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case td_api::chatActionSpeakingInCall::ID:
|
||||||
|
init(Type::SpeakingInCall);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
UNREACHABLE();
|
UNREACHABLE();
|
||||||
break;
|
break;
|
||||||
@ -137,6 +140,9 @@ DialogAction::DialogAction(tl_object_ptr<telegram_api::SendMessageAction> &&acti
|
|||||||
init(Type::UploadingVideoNote, upload_round_action->progress_);
|
init(Type::UploadingVideoNote, upload_round_action->progress_);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case telegram_api::speakingInGroupCallAction::ID:
|
||||||
|
init(Type::SpeakingInCall);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
UNREACHABLE();
|
UNREACHABLE();
|
||||||
break;
|
break;
|
||||||
@ -171,6 +177,8 @@ tl_object_ptr<telegram_api::SendMessageAction> DialogAction::get_input_send_mess
|
|||||||
return make_tl_object<telegram_api::sendMessageRecordRoundAction>();
|
return make_tl_object<telegram_api::sendMessageRecordRoundAction>();
|
||||||
case Type::UploadingVideoNote:
|
case Type::UploadingVideoNote:
|
||||||
return make_tl_object<telegram_api::sendMessageUploadRoundAction>(progress_);
|
return make_tl_object<telegram_api::sendMessageUploadRoundAction>(progress_);
|
||||||
|
case Type::SpeakingInCall:
|
||||||
|
return make_tl_object<telegram_api::speakingInGroupCallAction>();
|
||||||
default:
|
default:
|
||||||
UNREACHABLE();
|
UNREACHABLE();
|
||||||
return nullptr;
|
return nullptr;
|
||||||
@ -205,6 +213,8 @@ tl_object_ptr<secret_api::SendMessageAction> DialogAction::get_secret_input_send
|
|||||||
return make_tl_object<secret_api::sendMessageRecordRoundAction>();
|
return make_tl_object<secret_api::sendMessageRecordRoundAction>();
|
||||||
case Type::UploadingVideoNote:
|
case Type::UploadingVideoNote:
|
||||||
return make_tl_object<secret_api::sendMessageUploadRoundAction>();
|
return make_tl_object<secret_api::sendMessageUploadRoundAction>();
|
||||||
|
case Type::SpeakingInCall:
|
||||||
|
return make_tl_object<secret_api::sendMessageTypingAction>();
|
||||||
default:
|
default:
|
||||||
UNREACHABLE();
|
UNREACHABLE();
|
||||||
return nullptr;
|
return nullptr;
|
||||||
@ -239,6 +249,8 @@ tl_object_ptr<td_api::ChatAction> DialogAction::get_chat_action_object() const {
|
|||||||
return td_api::make_object<td_api::chatActionRecordingVideoNote>();
|
return td_api::make_object<td_api::chatActionRecordingVideoNote>();
|
||||||
case Type::UploadingVideoNote:
|
case Type::UploadingVideoNote:
|
||||||
return td_api::make_object<td_api::chatActionUploadingVideoNote>(progress_);
|
return td_api::make_object<td_api::chatActionUploadingVideoNote>(progress_);
|
||||||
|
case Type::SpeakingInCall:
|
||||||
|
return td_api::make_object<td_api::chatActionSpeakingInCall>();
|
||||||
default:
|
default:
|
||||||
UNREACHABLE();
|
UNREACHABLE();
|
||||||
return td_api::make_object<td_api::chatActionCancel>();
|
return td_api::make_object<td_api::chatActionCancel>();
|
||||||
@ -366,6 +378,8 @@ StringBuilder &operator<<(StringBuilder &string_builder, const DialogAction &act
|
|||||||
return "RecordingVideoNote";
|
return "RecordingVideoNote";
|
||||||
case DialogAction::Type::UploadingVideoNote:
|
case DialogAction::Type::UploadingVideoNote:
|
||||||
return "UploadingVideoNote";
|
return "UploadingVideoNote";
|
||||||
|
case DialogAction::Type::SpeakingInCall:
|
||||||
|
return "SpeakingInCall";
|
||||||
default:
|
default:
|
||||||
UNREACHABLE();
|
UNREACHABLE();
|
||||||
return "Cancel";
|
return "Cancel";
|
||||||
|
@ -30,7 +30,8 @@ class DialogAction {
|
|||||||
ChoosingContact,
|
ChoosingContact,
|
||||||
StartPlayingGame,
|
StartPlayingGame,
|
||||||
RecordingVideoNote,
|
RecordingVideoNote,
|
||||||
UploadingVideoNote
|
UploadingVideoNote,
|
||||||
|
SpeakingInCall
|
||||||
};
|
};
|
||||||
Type type_ = Type::Cancel;
|
Type type_ = Type::Cancel;
|
||||||
int32 progress_ = 0;
|
int32 progress_ = 0;
|
||||||
|
@ -1195,6 +1195,9 @@ class CliClient final : public Actor {
|
|||||||
if (action == "uvn" || action == "upload_video_note") {
|
if (action == "uvn" || action == "upload_video_note") {
|
||||||
return td_api::make_object<td_api::chatActionUploadingVideoNote>(50);
|
return td_api::make_object<td_api::chatActionUploadingVideoNote>(50);
|
||||||
}
|
}
|
||||||
|
if (action == "sic" || action == "speaking_in_call") {
|
||||||
|
return td_api::make_object<td_api::chatActionSpeakingInCall>();
|
||||||
|
}
|
||||||
return td_api::make_object<td_api::chatActionTyping>();
|
return td_api::make_object<td_api::chatActionTyping>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user