mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 22:55:11 +00:00
Added support of bot apps to sponsored messages.
Added api support of custom button text in sponsored messages.
This commit is contained in:
@@ -7,9 +7,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "history/history_item.h"
|
||||
#include "base/timer.h"
|
||||
#include "history/history_item.h"
|
||||
#include "ui/image/image_location.h"
|
||||
#include "window/window_session_controller_link_info.h"
|
||||
|
||||
class History;
|
||||
|
||||
@@ -28,12 +29,13 @@ struct SponsoredFrom {
|
||||
bool isMegagroup = false;
|
||||
bool isChannel = false;
|
||||
bool isPublic = false;
|
||||
bool isBot = false;
|
||||
std::optional<Window::PeerByLinkInfo> botLinkInfo;
|
||||
bool isExactPost = false;
|
||||
bool isRecommended = false;
|
||||
QString externalLink;
|
||||
PhotoId externalLinkPhotoId;
|
||||
PhotoId webpageOrBotPhotoId = PhotoId(0);
|
||||
bool isForceUserpicDisplay = false;
|
||||
QString buttonText;
|
||||
};
|
||||
|
||||
struct SponsoredMessage {
|
||||
@@ -63,6 +65,7 @@ public:
|
||||
QString externalLink;
|
||||
bool isForceUserpicDisplay = false;
|
||||
QString buttonText;
|
||||
std::optional<Window::PeerByLinkInfo> botLinkInfo;
|
||||
};
|
||||
using RandomId = QByteArray;
|
||||
explicit SponsoredMessages(not_null<Session*> owner);
|
||||
|
Reference in New Issue
Block a user