Don't try to process stories inside message content by bots.

This commit is contained in:
levlam 2023-12-07 13:34:37 +03:00
parent a7c81ae21b
commit f4f46c9a79

View File

@ -5713,7 +5713,7 @@ unique_ptr<MessageContent> get_message_content(Td *td, FormattedText message,
LOG(ERROR) << "Receive " << to_string(media); LOG(ERROR) << "Receive " << to_string(media);
break; break;
} }
if (media->story_ != nullptr) { if (media->story_ != nullptr && !td->auth_manager_->is_bot()) {
auto actual_story_id = td->story_manager_->on_get_story(dialog_id, std::move(media->story_)); auto actual_story_id = td->story_manager_->on_get_story(dialog_id, std::move(media->story_));
if (story_id != actual_story_id) { if (story_id != actual_story_id) {
LOG(ERROR) << "Receive " << actual_story_id << " instead of " << story_id; LOG(ERROR) << "Receive " << actual_story_id << " instead of " << story_id;