Add "Join Call" button to confcall link previews.

This commit is contained in:
John Preston 2025-03-31 00:13:39 +05:00
parent 346f7aadd6
commit 41c0a5ee3b
4 changed files with 7 additions and 0 deletions

View file

@ -5856,6 +5856,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_view_button_stickerset" = "View stickers";
"lng_view_button_emojipack" = "View emoji";
"lng_view_button_collectible" = "View collectible";
"lng_view_button_call" = "Join call";
"lng_sponsored_hide_ads" = "Hide";
"lng_sponsored_title" = "What are sponsored messages?";

View file

@ -159,6 +159,8 @@ WebPageType ParseWebPageType(
return WebPageType::VoiceChat;
} else if (type == u"telegram_livestream"_q) {
return WebPageType::Livestream;
} else if (type == u"telegram_call"_q) {
return WebPageType::ConferenceCall;
} else if (type == u"telegram_user"_q) {
return WebPageType::User;
} else if (type == u"telegram_botapp"_q) {

View file

@ -55,6 +55,7 @@ enum class WebPageType : uint8 {
VoiceChat,
Livestream,
ConferenceCall,
Factcheck,
};

View file

@ -220,6 +220,8 @@ constexpr auto kSponsoredUserpicLines = 2;
? tr::lng_view_button_voice_chat(tr::now)
: (type == WebPageType::Livestream)
? tr::lng_view_button_voice_chat_channel(tr::now)
: (type == WebPageType::ConferenceCall)
? tr::lng_view_button_call(tr::now)
: (type == WebPageType::Bot)
? tr::lng_view_button_bot(tr::now)
: (type == WebPageType::User)
@ -258,6 +260,7 @@ constexpr auto kSponsoredUserpicLines = 2;
|| (type == WebPageType::User)
|| (type == WebPageType::VoiceChat)
|| (type == WebPageType::Livestream)
|| (type == WebPageType::ConferenceCall)
|| (type == WebPageType::BotApp)
|| ((type == WebPageType::Theme)
&& webpage->document