Disallow replies to channel stories.
This commit is contained in:
parent
b42781a631
commit
d1a2ca9261
@ -14,7 +14,7 @@
|
||||
#include "td/utils/logging.h"
|
||||
|
||||
namespace td {
|
||||
|
||||
/*
|
||||
MessageInputReplyTo::MessageInputReplyTo(const td_api::object_ptr<td_api::MessageReplyTo> &reply_to_ptr) {
|
||||
if (reply_to_ptr == nullptr) {
|
||||
return;
|
||||
@ -34,7 +34,7 @@ MessageInputReplyTo::MessageInputReplyTo(const td_api::object_ptr<td_api::Messag
|
||||
UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
telegram_api::object_ptr<telegram_api::InputReplyTo> MessageInputReplyTo::get_input_reply_to(
|
||||
Td *td, MessageId top_thread_message_id) const {
|
||||
if (story_full_id_.is_valid()) {
|
||||
|
@ -34,7 +34,7 @@ struct MessageInputReplyTo {
|
||||
CHECK(!story_full_id_.is_valid() || !message_id_.is_valid());
|
||||
}
|
||||
|
||||
explicit MessageInputReplyTo(const td_api::object_ptr<td_api::MessageReplyTo> &reply_to_ptr);
|
||||
//explicit MessageInputReplyTo(const td_api::object_ptr<td_api::MessageReplyTo> &reply_to_ptr);
|
||||
|
||||
telegram_api::object_ptr<telegram_api::InputReplyTo> get_input_reply_to(Td *td,
|
||||
MessageId top_thread_message_id) const;
|
||||
|
@ -24585,7 +24585,7 @@ MessageInputReplyTo MessagesManager::get_message_input_reply_to(Dialog *d, Messa
|
||||
auto reply_to_story = td_api::move_object_as<td_api::messageReplyToStory>(reply_to);
|
||||
auto story_id = StoryId(reply_to_story->story_id_);
|
||||
auto sender_dialog_id = DialogId(reply_to_story->story_sender_chat_id_);
|
||||
if (d->dialog_id != sender_dialog_id) {
|
||||
if (d->dialog_id != sender_dialog_id || sender_dialog_id.get_type() != DialogType::User) {
|
||||
LOG(INFO) << "Ignore reply to story from " << sender_dialog_id << " in a wrong " << d->dialog_id;
|
||||
return {};
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user