2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Handle t.me/channel?boost links.

This commit is contained in:
John Preston
2023-09-12 21:00:39 +04:00
parent 39f8394f98
commit 1c2951598b
17 changed files with 920 additions and 204 deletions

View File

@@ -100,6 +100,7 @@ enum class ResolveType {
AddToChannel,
ShareGame,
Mention,
Boost,
};
struct PeerThemeOverride {
@@ -311,6 +312,16 @@ private:
not_null<PeerData*> peer,
const PeerByLinkInfo &info);
void resolveBoostState(not_null<ChannelData*> channel);
void applyBoost(not_null<ChannelData*> channel, Fn<void(bool)> done);
void replaceBoostConfirm(
not_null<PeerData*> from,
not_null<ChannelData*> channel,
Fn<void(bool)> done);
void applyBoostChecked(
not_null<ChannelData*> channel,
Fn<void(bool)> done);
const not_null<Main::Session*> _session;
MTP::Sender _api;
@@ -321,6 +332,8 @@ private:
MsgId _showingRepliesRootId = 0;
mtpRequestId _showingRepliesRequestId = 0;
ChannelData *_boostStateResolving = nullptr;
};
class SessionController : public SessionNavigation {