Improve name of the chatActionWatchingAnimations chat action.
This commit is contained in:
parent
a7dcbe8c18
commit
057cee8674
@ -2069,8 +2069,8 @@ 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 viewing animations sent by the other party by clicking on animated emojies @emoji The animated emoji
|
//@description The user is watching animations sent by the other party by clicking on an animated emoji @emoji The animated emoji
|
||||||
chatActionEnjoyingAnimations emoji:string = ChatAction;
|
chatActionWatchingAnimations emoji:string = ChatAction;
|
||||||
|
|
||||||
//@description The user has canceled the previous action
|
//@description The user has canceled the previous action
|
||||||
chatActionCancel = ChatAction;
|
chatActionCancel = ChatAction;
|
||||||
@ -3835,7 +3835,7 @@ updateUsersNearby users_nearby:vector<chatNearby> = Update;
|
|||||||
//@description The list of supported dice emojis has changed @emojis The new list of supported dice emojis
|
//@description The list of supported dice emojis has changed @emojis The new list of supported dice emojis
|
||||||
updateDiceEmojis emojis:vector<string> = Update;
|
updateDiceEmojis emojis:vector<string> = Update;
|
||||||
|
|
||||||
//@description Some animated emoji message was clicked and a big animated sticker should be played if the message is visible on the screen. chatActionEnjoyingAnimations with the text of the message needs to be sent if the sticker is played
|
//@description Some animated emoji message was clicked and a big animated sticker should be played if the message is visible on the screen. chatActionWatchingAnimations with the text of the message needs to be sent if the sticker is played
|
||||||
//@chat_id Chat identifier @message_id Message identifier @sticker The animated sticker to be played
|
//@chat_id Chat identifier @message_id Message identifier @sticker The animated sticker to be played
|
||||||
updateAnimatedEmojiMessageClicked chat_id:int53 message_id:int53 sticker:sticker = Update;
|
updateAnimatedEmojiMessageClicked chat_id:int53 message_id:int53 sticker:sticker = Update;
|
||||||
|
|
||||||
|
@ -121,9 +121,9 @@ DialogAction::DialogAction(tl_object_ptr<td_api::ChatAction> &&action) {
|
|||||||
case td_api::chatActionChoosingSticker::ID:
|
case td_api::chatActionChoosingSticker::ID:
|
||||||
init(Type::ChoosingSticker);
|
init(Type::ChoosingSticker);
|
||||||
break;
|
break;
|
||||||
case td_api::chatActionEnjoyingAnimations::ID: {
|
case td_api::chatActionWatchingAnimations::ID: {
|
||||||
auto enjoying_animations_action = move_tl_object_as<td_api::chatActionEnjoyingAnimations>(action);
|
auto watching_animations_action = move_tl_object_as<td_api::chatActionWatchingAnimations>(action);
|
||||||
init(Type::EnjoyingAnimations, std::move(enjoying_animations_action->emoji_));
|
init(Type::WatchingAnimations, std::move(watching_animations_action->emoji_));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
@ -196,7 +196,7 @@ DialogAction::DialogAction(tl_object_ptr<telegram_api::SendMessageAction> &&acti
|
|||||||
break;
|
break;
|
||||||
case telegram_api::sendMessageEmojiInteractionSeen::ID: {
|
case telegram_api::sendMessageEmojiInteractionSeen::ID: {
|
||||||
auto emoji_interaction_seen_action = move_tl_object_as<telegram_api::sendMessageEmojiInteractionSeen>(action);
|
auto emoji_interaction_seen_action = move_tl_object_as<telegram_api::sendMessageEmojiInteractionSeen>(action);
|
||||||
init(Type::EnjoyingAnimations, std::move(emoji_interaction_seen_action->emoticon_));
|
init(Type::WatchingAnimations, std::move(emoji_interaction_seen_action->emoticon_));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case telegram_api::sendMessageEmojiInteraction::ID: {
|
case telegram_api::sendMessageEmojiInteraction::ID: {
|
||||||
@ -245,7 +245,7 @@ tl_object_ptr<telegram_api::SendMessageAction> DialogAction::get_input_send_mess
|
|||||||
return make_tl_object<telegram_api::sendMessageHistoryImportAction>(progress_);
|
return make_tl_object<telegram_api::sendMessageHistoryImportAction>(progress_);
|
||||||
case Type::ChoosingSticker:
|
case Type::ChoosingSticker:
|
||||||
return make_tl_object<telegram_api::sendMessageChooseStickerAction>();
|
return make_tl_object<telegram_api::sendMessageChooseStickerAction>();
|
||||||
case Type::EnjoyingAnimations:
|
case Type::WatchingAnimations:
|
||||||
return make_tl_object<telegram_api::sendMessageEmojiInteractionSeen>(emoji_);
|
return make_tl_object<telegram_api::sendMessageEmojiInteractionSeen>(emoji_);
|
||||||
case Type::ClickingAnimatedEmoji:
|
case Type::ClickingAnimatedEmoji:
|
||||||
default:
|
default:
|
||||||
@ -288,7 +288,7 @@ tl_object_ptr<secret_api::SendMessageAction> DialogAction::get_secret_input_send
|
|||||||
return make_tl_object<secret_api::sendMessageTypingAction>();
|
return make_tl_object<secret_api::sendMessageTypingAction>();
|
||||||
case Type::ChoosingSticker:
|
case Type::ChoosingSticker:
|
||||||
return make_tl_object<secret_api::sendMessageTypingAction>();
|
return make_tl_object<secret_api::sendMessageTypingAction>();
|
||||||
case Type::EnjoyingAnimations:
|
case Type::WatchingAnimations:
|
||||||
return make_tl_object<secret_api::sendMessageTypingAction>();
|
return make_tl_object<secret_api::sendMessageTypingAction>();
|
||||||
case Type::ClickingAnimatedEmoji:
|
case Type::ClickingAnimatedEmoji:
|
||||||
default:
|
default:
|
||||||
@ -327,8 +327,8 @@ tl_object_ptr<td_api::ChatAction> DialogAction::get_chat_action_object() const {
|
|||||||
return td_api::make_object<td_api::chatActionUploadingVideoNote>(progress_);
|
return td_api::make_object<td_api::chatActionUploadingVideoNote>(progress_);
|
||||||
case Type::ChoosingSticker:
|
case Type::ChoosingSticker:
|
||||||
return td_api::make_object<td_api::chatActionChoosingSticker>();
|
return td_api::make_object<td_api::chatActionChoosingSticker>();
|
||||||
case Type::EnjoyingAnimations:
|
case Type::WatchingAnimations:
|
||||||
return td_api::make_object<td_api::chatActionEnjoyingAnimations>(emoji_);
|
return td_api::make_object<td_api::chatActionWatchingAnimations>(emoji_);
|
||||||
case Type::ImportingMessages:
|
case Type::ImportingMessages:
|
||||||
case Type::SpeakingInVoiceChat:
|
case Type::SpeakingInVoiceChat:
|
||||||
case Type::ClickingAnimatedEmoji:
|
case Type::ClickingAnimatedEmoji:
|
||||||
@ -444,8 +444,8 @@ int32 DialogAction::get_importing_messages_action_progress() const {
|
|||||||
return progress_;
|
return progress_;
|
||||||
}
|
}
|
||||||
|
|
||||||
string DialogAction::get_enjoying_animations_emoji() const {
|
string DialogAction::get_watching_animations_emoji() const {
|
||||||
if (type_ == Type::EnjoyingAnimations) {
|
if (type_ == Type::WatchingAnimations) {
|
||||||
return emoji_;
|
return emoji_;
|
||||||
}
|
}
|
||||||
return string();
|
return string();
|
||||||
@ -499,8 +499,8 @@ StringBuilder &operator<<(StringBuilder &string_builder, const DialogAction &act
|
|||||||
return "ImportingMessages";
|
return "ImportingMessages";
|
||||||
case DialogAction::Type::ChoosingSticker:
|
case DialogAction::Type::ChoosingSticker:
|
||||||
return "ChoosingSticker";
|
return "ChoosingSticker";
|
||||||
case DialogAction::Type::EnjoyingAnimations:
|
case DialogAction::Type::WatchingAnimations:
|
||||||
return "EnjoyingAnimations";
|
return "WatchingAnimations";
|
||||||
case DialogAction::Type::ClickingAnimatedEmoji:
|
case DialogAction::Type::ClickingAnimatedEmoji:
|
||||||
return "ClickingAnimatedEmoji";
|
return "ClickingAnimatedEmoji";
|
||||||
default:
|
default:
|
||||||
|
@ -34,7 +34,7 @@ class DialogAction {
|
|||||||
SpeakingInVoiceChat,
|
SpeakingInVoiceChat,
|
||||||
ImportingMessages,
|
ImportingMessages,
|
||||||
ChoosingSticker,
|
ChoosingSticker,
|
||||||
EnjoyingAnimations,
|
WatchingAnimations,
|
||||||
ClickingAnimatedEmoji
|
ClickingAnimatedEmoji
|
||||||
};
|
};
|
||||||
Type type_ = Type::Cancel;
|
Type type_ = Type::Cancel;
|
||||||
@ -76,7 +76,7 @@ class DialogAction {
|
|||||||
|
|
||||||
int32 get_importing_messages_action_progress() const;
|
int32 get_importing_messages_action_progress() const;
|
||||||
|
|
||||||
string get_enjoying_animations_emoji() const;
|
string get_watching_animations_emoji() const;
|
||||||
|
|
||||||
struct ClickingAnimateEmojiInfo {
|
struct ClickingAnimateEmojiInfo {
|
||||||
int32 message_id;
|
int32 message_id;
|
||||||
|
@ -5558,7 +5558,7 @@ StickerSetId add_sticker_set(Td *td, tl_object_ptr<telegram_api::InputStickerSet
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool is_unsent_animated_emoji_click(Td *td, DialogId dialog_id, const DialogAction &action) {
|
bool is_unsent_animated_emoji_click(Td *td, DialogId dialog_id, const DialogAction &action) {
|
||||||
auto emoji = action.get_enjoying_animations_emoji();
|
auto emoji = action.get_watching_animations_emoji();
|
||||||
if (emoji.empty()) {
|
if (emoji.empty()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1321,8 +1321,8 @@ class CliClient final : public Actor {
|
|||||||
if (action == "cs" || action == "choose_sticker") {
|
if (action == "cs" || action == "choose_sticker") {
|
||||||
return td_api::make_object<td_api::chatActionChoosingSticker>();
|
return td_api::make_object<td_api::chatActionChoosingSticker>();
|
||||||
}
|
}
|
||||||
if (begins_with(action, "ea")) {
|
if (begins_with(action, "wa")) {
|
||||||
return td_api::make_object<td_api::chatActionEnjoyingAnimations>(action.substr(2).str());
|
return td_api::make_object<td_api::chatActionWatchingAnimations>(action.substr(2).str());
|
||||||
}
|
}
|
||||||
return td_api::make_object<td_api::chatActionTyping>();
|
return td_api::make_object<td_api::chatActionTyping>();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user