2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 22:46:10 +00:00

Scheme updated, not channel messages editing updates handled.

This commit is contained in:
John Preston
2016-03-30 21:13:07 +04:00
parent b981472877
commit 8cde13fb8c
6 changed files with 350 additions and 260 deletions

View File

@@ -648,15 +648,15 @@ void EditCaptionBox::onSave(bool ctrlShiftEnter) {
return;
}
MTPchannels_EditMessage::Flags flags = 0;
MTPmessages_EditMessage::Flags flags = 0;
if (_previewCancelled) {
flags |= MTPchannels_EditMessage::Flag::f_no_webpage;
flags |= MTPmessages_EditMessage::Flag::f_no_webpage;
}
MTPVector<MTPMessageEntity> sentEntities;
if (!sentEntities.c_vector().v.isEmpty()) {
flags |= MTPchannels_EditMessage::Flag::f_entities;
flags |= MTPmessages_EditMessage::Flag::f_entities;
}
_saveRequestId = MTP::send(MTPchannels_EditMessage(MTP_flags(flags), item->history()->peer->asChannel()->inputChannel, MTP_int(item->id), MTP_string(_field->getLastText()), sentEntities), rpcDone(&EditCaptionBox::saveDone), rpcFail(&EditCaptionBox::saveFail));
_saveRequestId = MTP::send(MTPmessages_EditMessage(MTP_flags(flags), item->history()->peer->input, MTP_int(item->id), MTP_string(_field->getLastText()), sentEntities, MTPnullMarkup), rpcDone(&EditCaptionBox::saveDone), rpcFail(&EditCaptionBox::saveFail));
}
void EditCaptionBox::saveDone(const MTPUpdates &updates) {