init
Some checks failed
Docker. / Ubuntu (push) Has been cancelled
User-agent updater. / User-agent (push) Failing after 15s
Lock Threads / lock (push) Failing after 10s
Waiting for answer. / waiting-for-answer (push) Failing after 22s
Needs user action. / needs-user-action (push) Failing after 8s
Can't reproduce. / cant-reproduce (push) Failing after 8s
Close stale issues and PRs / stale (push) Has been cancelled
Some checks failed
Docker. / Ubuntu (push) Has been cancelled
User-agent updater. / User-agent (push) Failing after 15s
Lock Threads / lock (push) Failing after 10s
Waiting for answer. / waiting-for-answer (push) Failing after 22s
Needs user action. / needs-user-action (push) Failing after 8s
Can't reproduce. / cant-reproduce (push) Failing after 8s
Close stale issues and PRs / stale (push) Has been cancelled
This commit is contained in:
40
Telegram/SourceFiles/history/history_item_edition.cpp
Normal file
40
Telegram/SourceFiles/history/history_item_edition.cpp
Normal file
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
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
|
||||
*/
|
||||
#include "history/history_item_edition.h"
|
||||
|
||||
#include "api/api_text_entities.h"
|
||||
#include "main/main_session.h"
|
||||
|
||||
HistoryMessageEdition::HistoryMessageEdition(
|
||||
not_null<Main::Session*> session,
|
||||
const MTPDmessage &message)
|
||||
: suggest(HistoryMessageSuggestInfo(message.vsuggested_post())) {
|
||||
isEditHide = message.is_edit_hide();
|
||||
isMediaUnread = message.is_media_unread();
|
||||
repeatPeriod = message.vschedule_repeat_period().value_or_empty();
|
||||
editDate = message.vedit_date().value_or(-1);
|
||||
textWithEntities = TextWithEntities{
|
||||
qs(message.vmessage()),
|
||||
Api::EntitiesFromMTP(
|
||||
session,
|
||||
message.ventities().value_or_empty())
|
||||
};
|
||||
replyMarkup = HistoryMessageMarkupData(message.vreply_markup());
|
||||
mtpMedia = message.vmedia();
|
||||
mtpReactions = message.vreactions();
|
||||
mtpFactcheck = message.vfactcheck();
|
||||
views = message.vviews().value_or(-1);
|
||||
forwards = message.vforwards().value_or(-1);
|
||||
if (const auto mtpReplies = message.vreplies()) {
|
||||
replies = HistoryMessageRepliesData(mtpReplies);
|
||||
}
|
||||
invertMedia = message.is_invert_media();
|
||||
|
||||
const auto period = message.vttl_period();
|
||||
ttl = (period && period->v > 0) ? (message.vdate().v + period->v) : 0;
|
||||
}
|
||||
Reference in New Issue
Block a user