2019-09-16 11:14:06 +00:00
|
|
|
/*
|
|
|
|
This file is part of Telegram Desktop,
|
|
|
|
the official desktop application for the Telegram messaging service.
|
|
|
|
|
|
|
|
For license and copyright information please follow this link:
|
|
|
|
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "ui/text/text_entity.h"
|
|
|
|
|
2020-06-08 08:03:45 +00:00
|
|
|
namespace Main {
|
|
|
|
class Session;
|
|
|
|
} // namespace Main
|
|
|
|
|
2019-09-16 11:14:06 +00:00
|
|
|
namespace Api {
|
|
|
|
|
|
|
|
enum class ConvertOption {
|
|
|
|
WithLocal,
|
|
|
|
SkipLocal,
|
|
|
|
};
|
2020-06-08 08:03:45 +00:00
|
|
|
|
|
|
|
[[nodiscard]] EntitiesInText EntitiesFromMTP(
|
|
|
|
Main::Session *session,
|
|
|
|
const QVector<MTPMessageEntity> &entities);
|
|
|
|
|
|
|
|
[[nodiscard]] MTPVector<MTPMessageEntity> EntitiesToMTP(
|
|
|
|
not_null<Main::Session*> session,
|
2019-09-16 11:14:06 +00:00
|
|
|
const EntitiesInText &entities,
|
|
|
|
ConvertOption option = ConvertOption::WithLocal);
|
|
|
|
|
|
|
|
} // namespace Api
|