Fix stopping local polls.

GitOrigin-RevId: b93d62aa04c2ee4fb2d3e1c0f697709552b028b0
This commit is contained in:
levlam 2019-03-13 17:53:48 +03:00
parent 07b24062d4
commit c075f6da9a

View File

@ -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) {
// do not forget about failed to send message forwards
switch (content->get_type()) {
case MessageContentType::LiveLocation: {
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: {
const MessagePoll *message_poll = static_cast<const MessagePoll *>(content.get());
if (PollManager::is_local_poll_id(message_poll->poll_id)) {
td->poll_manager_->stop_local_poll(message_poll->poll_id);
}
break;
}
default: