2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Fixed sending polls as reply to other messages.

Fixes #5550.
This commit is contained in:
23rd
2019-02-17 14:43:46 +03:00
committed by John Preston
parent bdfb9b4143
commit 193e454fd4
4 changed files with 25 additions and 1 deletions

View File

@@ -1118,6 +1118,15 @@ bool MainWidget::historyInSelectionMode() const {
return _history->inSelectionMode();
}
MsgId MainWidget::currentReplyToIdFor(not_null<History*> history) const {
if (_history->history() == history) {
return _history->replyToId();
} else if (const auto localDraft = history->localDraft()) {
return localDraft->msgId;
}
return 0;
}
void MainWidget::sendBotCommand(PeerData *peer, UserData *bot, const QString &cmd, MsgId replyTo) {
_history->sendBotCommand(peer, bot, cmd, replyTo);
}