Fix stopping local polls.
GitOrigin-RevId: b93d62aa04c2ee4fb2d3e1c0f697709552b028b0
This commit is contained in:
parent
07b24062d4
commit
c075f6da9a
@ -4796,6 +4796,7 @@ void update_expired_message_content(unique_ptr<MessageContent> &content) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void update_failed_to_send_message_content(Td *td, unique_ptr<MessageContent> &content) {
|
void update_failed_to_send_message_content(Td *td, unique_ptr<MessageContent> &content) {
|
||||||
|
// do not forget about failed to send message forwards
|
||||||
switch (content->get_type()) {
|
switch (content->get_type()) {
|
||||||
case MessageContentType::LiveLocation: {
|
case MessageContentType::LiveLocation: {
|
||||||
MessageLiveLocation *message_live_location = static_cast<MessageLiveLocation *>(content.get());
|
MessageLiveLocation *message_live_location = static_cast<MessageLiveLocation *>(content.get());
|
||||||
@ -4804,7 +4805,9 @@ void update_failed_to_send_message_content(Td *td, unique_ptr<MessageContent> &c
|
|||||||
}
|
}
|
||||||
case MessageContentType::Poll: {
|
case MessageContentType::Poll: {
|
||||||
const MessagePoll *message_poll = static_cast<const MessagePoll *>(content.get());
|
const MessagePoll *message_poll = static_cast<const MessagePoll *>(content.get());
|
||||||
td->poll_manager_->stop_local_poll(message_poll->poll_id);
|
if (PollManager::is_local_poll_id(message_poll->poll_id)) {
|
||||||
|
td->poll_manager_->stop_local_poll(message_poll->poll_id);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
Reference in New Issue
Block a user