Support updateQuickReplyShortcut in getCurrentState.
This commit is contained in:
parent
6b97b9289e
commit
d813b5c438
@ -501,4 +501,14 @@ void QuickReplyManager::send_update_quick_reply_shortcut_deleted(const Shortcut
|
|||||||
send_closure(G()->td(), &Td::send_update, get_update_quick_reply_shortcut_deleted_object(s));
|
send_closure(G()->td(), &Td::send_update, get_update_quick_reply_shortcut_deleted_object(s));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void QuickReplyManager::get_current_state(vector<td_api::object_ptr<td_api::Update>> &updates) const {
|
||||||
|
if (td_->auth_manager_->is_bot()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (auto &shortcut : shortcuts_.shortcuts_) {
|
||||||
|
updates.push_back(get_update_quick_reply_shortcut_object(shortcut.get(), "get_current_state"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace td
|
} // namespace td
|
||||||
|
@ -30,6 +30,8 @@ class QuickReplyManager final : public Actor {
|
|||||||
|
|
||||||
void reload_quick_reply_shortcuts();
|
void reload_quick_reply_shortcuts();
|
||||||
|
|
||||||
|
void get_current_state(vector<td_api::object_ptr<td_api::Update>> &updates) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
struct QuickReplyMessage {
|
struct QuickReplyMessage {
|
||||||
QuickReplyMessage() = default;
|
QuickReplyMessage() = default;
|
||||||
|
@ -4318,6 +4318,8 @@ void Td::on_request(uint64 id, const td_api::getCurrentState &request) {
|
|||||||
|
|
||||||
notification_manager_->get_current_state(updates);
|
notification_manager_->get_current_state(updates);
|
||||||
|
|
||||||
|
quick_reply_manager_->get_current_state(updates);
|
||||||
|
|
||||||
saved_messages_manager_->get_current_state(updates);
|
saved_messages_manager_->get_current_state(updates);
|
||||||
|
|
||||||
story_manager_->get_current_state(updates);
|
story_manager_->get_current_state(updates);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user