mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-30 22:25:12 +00:00
Moving to Qt 5.6.0, instructions can be broken.
This commit is contained in:
@@ -1098,6 +1098,7 @@ void MainWidget::sendMessage(History *hist, const QString &text, MsgId replyTo,
|
||||
QString sendingText, leftText = prepareTextWithEntities(text, leftEntities, itemTextOptions(hist, App::self()).flags);
|
||||
|
||||
QString command = parseCommandFromMessage(hist, text);
|
||||
HistoryItem *lastMessage = nullptr;
|
||||
|
||||
if (replyTo < 0) replyTo = _history->replyToId();
|
||||
while (command.isEmpty() && textSplit(sendingText, sendingEntities, leftText, leftEntities, MaxMessageSize)) {
|
||||
@@ -1142,10 +1143,12 @@ void MainWidget::sendMessage(History *hist, const QString &text, MsgId replyTo,
|
||||
if (!sentEntities.c_vector().v.isEmpty()) {
|
||||
sendFlags |= MTPmessages_SendMessage::Flag::f_entities;
|
||||
}
|
||||
hist->addNewMessage(MTP_message(MTP_flags(flags), MTP_int(newId.msg), MTP_int(showFromName ? MTP::authedId() : 0), peerToMTP(hist->peer->id), MTPnullFwdHeader, MTPint(), MTP_int(replyTo), MTP_int(unixtime()), msgText, media, MTPnullMarkup, localEntities, MTP_int(1), MTPint()), NewMessageUnread);
|
||||
lastMessage = hist->addNewMessage(MTP_message(MTP_flags(flags), MTP_int(newId.msg), MTP_int(showFromName ? MTP::authedId() : 0), peerToMTP(hist->peer->id), MTPnullFwdHeader, MTPint(), MTP_int(replyTo), MTP_int(unixtime()), msgText, media, MTPnullMarkup, localEntities, MTP_int(1), MTPint()), NewMessageUnread);
|
||||
hist->sendRequestId = MTP::send(MTPmessages_SendMessage(MTP_flags(sendFlags), hist->peer->input, MTP_int(replyTo), msgText, MTP_long(randomId), MTPnullMarkup, sentEntities), rpcDone(&MainWidget::sentUpdatesReceived, randomId), rpcFail(&MainWidget::sendMessageFail), 0, 0, hist->sendRequestId);
|
||||
}
|
||||
|
||||
hist->lastSentMsg = lastMessage;
|
||||
|
||||
finishForwarding(hist, broadcast, silent);
|
||||
|
||||
executeParsedCommand(command);
|
||||
|
Reference in New Issue
Block a user