Fix crash with inline results sending.

This commit is contained in:
John Preston 2024-11-17 22:41:52 +04:00
parent fa8262cbe9
commit 42a70ff7d0

View file

@ -4028,13 +4028,17 @@ void ApiWrap::sendInlineResult(
history->finishSavingCloudDraft(
topicRootId,
UnixtimeFromMsgId(response.outerMsgId));
done(true);
if (done) {
done(true);
}
}, [=](const MTP::Error &error, const MTP::Response &response) {
sendMessageFail(error, peer, randomId, newId);
history->finishSavingCloudDraft(
topicRootId,
UnixtimeFromMsgId(response.outerMsgId));
done(false);
if (done) {
done(false);
}
});
finishForwarding(action);
}