2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Handle errors in getMessages().

This commit is contained in:
John Preston
2017-11-23 19:41:13 +04:00
parent 39428841e4
commit efdba3a482
6 changed files with 57 additions and 11 deletions

View File

@@ -4931,7 +4931,10 @@ void MainWidget::feedUpdates(const MTPUpdates &updates, uint64 randomId) {
if (peerId) {
if (auto item = App::histItemById(peerToChannel(peerId), d.vid.v)) {
if (d.has_entities() && !mentionUsersLoaded(d.ventities)) {
Auth().api().requestMessageData(item->history()->peer->asChannel(), item->id, ApiWrap::RequestMessageDataCallback());
Auth().api().requestMessageData(
item->history()->peer->asChannel(),
item->id,
ApiWrap::RequestMessageDataCallback());
}
auto entities = d.has_entities() ? TextUtilities::EntitiesFromMTP(d.ventities.v) : EntitiesInText();
item->setText({ text, entities });