Various fixes.
This commit is contained in:
parent
0ea42c5054
commit
312006a207
@ -1656,11 +1656,11 @@ td_api::object_ptr<td_api::story> StoryManager::get_story_object(StoryFullId sto
|
|||||||
|
|
||||||
return td_api::make_object<td_api::story>(
|
return td_api::make_object<td_api::story>(
|
||||||
story_full_id.get_story_id().get(), td_->messages_manager_->get_chat_id_object(dialog_id, "get_story_object"),
|
story_full_id.get_story_id().get(), td_->messages_manager_->get_chat_id_object(dialog_id, "get_story_object"),
|
||||||
story->date_, story->is_edited_, story->is_pinned_, is_visible_only_for_self, can_be_forwarded, can_be_replied,
|
story->date_, is_edited, story->is_pinned_, is_visible_only_for_self, can_be_forwarded, can_be_replied,
|
||||||
can_get_story_viewers(story_full_id, story).is_ok(),
|
can_get_story_viewers(story_full_id, story).is_ok(),
|
||||||
story->interaction_info_.get_story_interaction_info_object(td_), std::move(privacy_rules),
|
story->interaction_info_.get_story_interaction_info_object(td_), std::move(privacy_rules),
|
||||||
get_story_content_object(td_, content),
|
get_story_content_object(td_, content),
|
||||||
get_formatted_text_object(story->caption_, true, get_story_content_duration(td_, content)));
|
get_formatted_text_object(*caption, true, get_story_content_duration(td_, content)));
|
||||||
}
|
}
|
||||||
|
|
||||||
td_api::object_ptr<td_api::stories> StoryManager::get_stories_object(int32 total_count,
|
td_api::object_ptr<td_api::stories> StoryManager::get_stories_object(int32 total_count,
|
||||||
|
@ -1947,8 +1947,8 @@ void UpdatesManager::on_get_pts_update(int32 pts,
|
|||||||
std::move(difference->new_messages_), std::move(difference->new_encrypted_messages_),
|
std::move(difference->new_messages_), std::move(difference->new_encrypted_messages_),
|
||||||
std::move(difference->other_updates_), std::move(difference->chats_), std::move(difference->users_),
|
std::move(difference->other_updates_), std::move(difference->chats_), std::move(difference->users_),
|
||||||
std::move(difference->state_));
|
std::move(difference->state_));
|
||||||
// fallthrough
|
|
||||||
}
|
}
|
||||||
|
// fallthrough
|
||||||
case telegram_api::updates_differenceSlice::ID: {
|
case telegram_api::updates_differenceSlice::ID: {
|
||||||
auto difference = move_tl_object_as<telegram_api::updates_differenceSlice>(difference_ptr);
|
auto difference = move_tl_object_as<telegram_api::updates_differenceSlice>(difference_ptr);
|
||||||
|
|
||||||
|
@ -884,6 +884,10 @@ class CliClient final : public Actor {
|
|||||||
int64 user_id = 0;
|
int64 user_id = 0;
|
||||||
int32 story_id = 0;
|
int32 story_id = 0;
|
||||||
|
|
||||||
|
static MessageReplyTo get_default() {
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
|
||||||
operator td_api::object_ptr<td_api::MessageReplyTo>() const {
|
operator td_api::object_ptr<td_api::MessageReplyTo>() const {
|
||||||
if (message_id == 0 && user_id == 0 && story_id == 0) {
|
if (message_id == 0 && user_id == 0 && story_id == 0) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
@ -2092,7 +2096,7 @@ class CliClient final : public Actor {
|
|||||||
|
|
||||||
void send_message(int64 chat_id, td_api::object_ptr<td_api::InputMessageContent> &&input_message_content,
|
void send_message(int64 chat_id, td_api::object_ptr<td_api::InputMessageContent> &&input_message_content,
|
||||||
bool disable_notification = false, bool from_background = false,
|
bool disable_notification = false, bool from_background = false,
|
||||||
MessageReplyTo message_reply_to = {}) {
|
MessageReplyTo message_reply_to = MessageReplyTo::get_default()) {
|
||||||
auto id = send_request(td_api::make_object<td_api::sendMessage>(
|
auto id = send_request(td_api::make_object<td_api::sendMessage>(
|
||||||
chat_id, message_thread_id_, message_reply_to,
|
chat_id, message_thread_id_, message_reply_to,
|
||||||
td_api::make_object<td_api::messageSendOptions>(disable_notification, from_background, true, true,
|
td_api::make_object<td_api::messageSendOptions>(disable_notification, from_background, true, true,
|
||||||
|
Loading…
Reference in New Issue
Block a user