2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 22:55:11 +00:00

Use Main::Session in entities parsing.

This commit is contained in:
John Preston
2020-06-08 12:03:45 +04:00
parent 7a5f4e8a01
commit bdbcd8e540
26 changed files with 233 additions and 89 deletions

View File

@@ -17,6 +17,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "media/clip/media_clip_reader.h"
#include "mtproto/facade.h"
#include "lottie/lottie_animation.h"
#include "history/history.h"
#include "history/history_item.h"
#include "boxes/send_files_box.h"
#include "boxes/confirm_box.h"
@@ -129,6 +130,7 @@ MTPInputSingleMedia PrepareAlbumItemMedia(
auto caption = item->originalText();
TextUtilities::Trim(caption);
auto sentEntities = Api::EntitiesToMTP(
&item->history()->session(),
caption.entities,
Api::ConvertOption::SkipLocal);
const auto flags = !sentEntities.v.isEmpty()