mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 14:45:14 +00:00
Fix sending bot commands from autocomplete.
This commit is contained in:
@@ -3430,7 +3430,8 @@ void HistoryWidget::sendBotCommand(
|
|||||||
|
|
||||||
bool lastKeyboardUsed = (_keyboard->forMsgId() == FullMsgId(_channel, _history->lastKeyboardId)) && (_keyboard->forMsgId() == FullMsgId(_channel, replyTo));
|
bool lastKeyboardUsed = (_keyboard->forMsgId() == FullMsgId(_channel, _history->lastKeyboardId)) && (_keyboard->forMsgId() == FullMsgId(_channel, replyTo));
|
||||||
|
|
||||||
const auto toSend = replyTo
|
// 'bot' may be nullptr in case of sending from FieldAutocomplete.
|
||||||
|
const auto toSend = (replyTo || !bot)
|
||||||
? cmd
|
? cmd
|
||||||
: HistoryView::WrapBotCommandInChat(_peer, cmd, bot);
|
: HistoryView::WrapBotCommandInChat(_peer, cmd, bot);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user