2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-01 15:05:56 +00:00

MTP_bytes() replaces MTP_string() for QByteArray payload.

Scheme updated for bot callbacks sending data bytearrays.
ReplyKeyboard edition is supported when editing the messages.
This commit is contained in:
John Preston
2016-04-01 14:23:40 +04:00
parent fa4137418a
commit 0e0956451a
18 changed files with 202 additions and 105 deletions

View File

@@ -1474,8 +1474,8 @@ void MainWidget::sendBotCommand(PeerData *peer, const QString &cmd, MsgId replyT
history.sendBotCommand(peer, cmd, replyTo);
}
void MainWidget::sendBotCallback(PeerData *peer, const QString &cmd, MsgId replyTo) {
history.sendBotCallback(peer, cmd, replyTo);
void MainWidget::sendBotCallback(PeerData *peer, const QByteArray &data, MsgId replyTo) {
history.sendBotCallback(peer, data, replyTo);
}
bool MainWidget::insertBotCommand(const QString &cmd, bool specialGif) {
@@ -4189,7 +4189,7 @@ void MainWidget::feedUpdates(const MTPUpdates &updates, uint64 randomId) {
if (peerId) {
if (HistoryItem *item = App::histItemById(peerToChannel(peerId), d.vid.v)) {
item->setText(text, d.has_entities() ? entitiesFromMTP(d.ventities.c_vector().v) : EntitiesInText());
item->updateMedia(d.has_media() ? (&d.vmedia) : 0);
item->updateMedia(d.has_media() ? (&d.vmedia) : nullptr);
item->addToOverview(AddToOverviewNew);
}
}