mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-05 08:55:59 +00:00
Allow sending custom webpage previews.
This commit is contained in:
@@ -74,6 +74,15 @@ MTPInputReplyTo ReplyToForMTP(
|
||||
return MTPInputReplyTo();
|
||||
}
|
||||
|
||||
MTPInputMedia WebPageForMTP(const Data::WebPageDraft &draft) {
|
||||
using Flag = MTPDinputMediaWebPage::Flag;
|
||||
return MTP_inputMediaWebPage(
|
||||
MTP_flags(Flag::f_optional
|
||||
| (draft.forceLargeMedia ? Flag::f_force_large_media : Flag())
|
||||
| (draft.forceSmallMedia ? Flag::f_force_small_media : Flag())),
|
||||
MTP_string(draft.url));
|
||||
}
|
||||
|
||||
Histories::Histories(not_null<Session*> owner)
|
||||
: _owner(owner)
|
||||
, _readRequestsTimer([=] { sendReadRequests(); }) {
|
||||
|
Reference in New Issue
Block a user