diff --git a/data/web/corefork.telegram.org/api/config.html b/data/web/corefork.telegram.org/api/config.html index 4738cea251..de7eb1b021 100644 --- a/data/web/corefork.telegram.org/api/config.html +++ b/data/web/corefork.telegram.org/api/config.html @@ -83,12 +83,12 @@
config
, or if the invocation of help.getAppConfig returned an RPC error and there is no cached value.
Here's the full list of defaults that must be used:
-{
- "about_length_limit_default": 70,
- "about_length_limit_premium": 140,
- "authorization_autoconfirm_period": 604800,
- "autoarchive_setting_available": true,
- "autologin_domains": [
+{
+ "about_length_limit_default": 70,
+ "about_length_limit_premium": 140,
+ "authorization_autoconfirm_period": 604800,
+ "autoarchive_setting_available": true,
+ "autologin_domains": [
"instantview.telegram.org",
"translations.telegram.org",
"contest.dev",
@@ -99,12 +99,12 @@ background_connection": true,
+ "boosts_channel_level_max": 100,
+ "boosts_per_sent_gift": 3,
+ "bot_preview_medias_max": 12,
+ "business_chat_links_limit": 100,
+ "business_promo_order": [
"business_location",
"business_hours",
"quick_replies",
@@ -117,41 +117,41 @@ can_edit_factcheck": false,
+ "caption_length_limit_default": 1024,
+ "caption_length_limit_premium": 4096,
+ "channel_bg_icon_level_min": 4,
+ "channel_custom_wallpaper_level_min": 10,
+ "channel_emoji_status_level_min": 8,
+ "channel_profile_bg_icon_level_min": 7,
+ "channel_restrict_sponsored_level_min": 50,
+ "channel_revenue_withdrawal_enabled": true,
+ "channel_wallpaper_level_min": 9,
+ "channels_limit_default": 500,
+ "channels_limit_premium": 1000,
+ "channels_public_limit_default": 10,
+ "channels_public_limit_premium": 20,
+ "chat_read_mark_expire_period": 604800,
+ "chat_read_mark_size_threshold": 100,
+ "chatlist_invites_limit_default": 3,
+ "chatlist_invites_limit_premium": 100,
+ "chatlist_update_period": 300,
+ "chatlists_joined_limit_default": 2,
+ "chatlists_joined_limit_premium": 20,
+ "default_emoji_statuses_stickerset_id": "773947703670341676",
+ "dialog_filters_chats_limit_default": 100,
+ "dialog_filters_chats_limit_premium": 200,
+ "dialog_filters_enabled": true,
+ "dialog_filters_limit_default": 10,
+ "dialog_filters_limit_premium": 30,
+ "dialog_filters_tooltip": false,
+ "dialogs_folder_pinned_limit_default": 100,
+ "dialogs_folder_pinned_limit_premium": 200,
+ "dialogs_pinned_limit_default": 5,
+ "dialogs_pinned_limit_premium": 10,
+ "dismissed_suggestions": [],
+ "emojies_animated_zoom": 0.625,
+ "emojies_send_dice": [
"\ud83c\udfb2",
"\ud83c\udfaf",
"\ud83c\udfc0",
@@ -160,7 +160,7 @@ emojies_send_dice_success": {
"\ud83c\udfaf": {
"value": 6,
"frame_start": 62
@@ -186,13 +186,13 @@ emojies_sounds": [],
+ "factcheck_length_limit": 1024,
+ "fragment_prefixes": [
"888"
],
- "gif_search_branding": "tenor",
- "gif_search_emojies": [
+ "gif_search_branding": "tenor",
+ "gif_search_emojies": [
"\ud83d\udc4d",
"\ud83d\ude18",
"\ud83d\ude0d",
@@ -204,35 +204,35 @@ giveaway_add_peers_max": 10,
+ "giveaway_boosts_per_premium": 4,
+ "giveaway_countries_max": 10,
+ "giveaway_gifts_purchase_available": false,
+ "giveaway_period_max": 2678400,
+ "group_custom_wallpaper_level_min": 10,
+ "group_emoji_status_level_min": 8,
+ "group_emoji_stickers_level_min": 4,
+ "group_profile_bg_icon_level_min": 5,
+ "group_transcribe_level_min": 6,
+ "group_wallpaper_level_min": 9,
+ "groupcall_video_participants_max": 1000,
+ "hidden_members_group_size_min": 100,
+ "ignore_restriction_reasons": [],
+ "inapp_update_check_delay": 86400,
+ "intro_description_length_limit": 70,
+ "intro_title_length_limit": 32,
+ "keep_alive_service": true,
+ "large_queue_max_active_operations_count": 2,
+ "message_animated_emoji_max": 100,
+ "new_noncontact_peers_require_premium_without_ownpremium": false,
+ "pending_suggestions": [],
+ "pm_read_date_expire_period": 604800,
+ "premium_bot_username": "PremiumBot",
+ "premium_gift_attach_menu_icon": true,
+ "premium_gift_text_field_icon": false,
+ "premium_invoice_slug": "abc",
+ "premium_manage_subscription_url": "https://t.me/premiumbot?start=status",
+ "premium_promo_order": [
"stories",
"more_upload",
"double_limits",
@@ -256,104 +256,104 @@ premium_purchase_blocked": false,
+ "qr_login_camera": true,
+ "qr_login_code": "primary",
+ "quick_replies_limit": 100,
+ "quick_reply_messages_limit": 20,
+ "quote_length_max": 1024,
+ "reactions_in_chat_max": 100,
+ "reactions_uniq_max": 11,
+ "reactions_user_max_default": 1,
+ "reactions_user_max_premium": 3,
+ "recommended_channels_limit_default": 10,
+ "recommended_channels_limit_premium": 100,
+ "restriction_add_platforms": [],
+ "ringtone_duration_max": 5,
+ "ringtone_saved_count_max": 100,
+ "ringtone_size_max": 307200,
+ "round_video_encoding": {
"diameter": 384,
"video_bitrate": 1000,
"audio_bitrate": 64,
"max_size": 12582912
},
- "saved_dialogs_pinned_limit_default": 5,
- "saved_dialogs_pinned_limit_premium": 100,
- "saved_gifs_limit_default": 200,
- "saved_gifs_limit_premium": 400,
- "small_queue_max_active_operations_count": 5,
- "sponsored_links_inapp_allow": false,
- "stargifts_blocked": true,
- "stargifts_convert_period_max": 7776000,
- "stargifts_message_length_max": 255,
- "starref_connect_allowed": false,
- "starref_max_commission_permille": 800,
- "starref_min_commission_permille": 1,
- "starref_program_allowed": false,
- "starref_start_param_prefixes": [
+ "saved_dialogs_pinned_limit_default": 5,
+ "saved_dialogs_pinned_limit_premium": 100,
+ "saved_gifs_limit_default": 200,
+ "saved_gifs_limit_premium": 400,
+ "small_queue_max_active_operations_count": 5,
+ "sponsored_links_inapp_allow": false,
+ "stargifts_blocked": true,
+ "stargifts_convert_period_max": 7776000,
+ "stargifts_message_length_max": 255,
+ "starref_connect_allowed": false,
+ "starref_max_commission_permille": 800,
+ "starref_min_commission_permille": 1,
+ "starref_program_allowed": false,
+ "starref_start_param_prefixes": [
"_tgr_"
],
- "stars_gifts_enabled": true,
- "stars_paid_post_amount_max": 2500,
- "stars_paid_reaction_amount_max": 2500,
- "stars_purchase_blocked": true,
- "stars_revenue_withdrawal_min": 1000,
- "stars_subscription_amount_max": 2500,
- "stars_usd_sell_rate_x1000": 1410,
- "stars_usd_withdraw_rate_x1000": 1300,
- "stickers_emoji_cache_time": 86400,
- "stickers_emoji_suggest_only_api": false,
- "stickers_faved_limit_default": 5,
- "stickers_faved_limit_premium": 10,
- "stickers_normal_by_emoji_per_premium_num": 3,
- "stickers_premium_by_emoji_num": 0,
- "stories_area_url_max": 3,
- "stories_changelog_user_id": 777000,
- "stories_entities": "premium",
- "stories_pinned_to_top_count_max": 3,
- "stories_posting": "enabled",
- "stories_sent_monthly_limit_default": 30,
- "stories_sent_monthly_limit_premium": 3000,
- "stories_sent_weekly_limit_default": 7,
- "stories_sent_weekly_limit_premium": 700,
- "stories_stealth_cooldown_period": 10800,
- "stories_stealth_future_period": 1500,
- "stories_stealth_past_period": 300,
- "stories_suggested_reactions_limit_default": 1,
- "stories_suggested_reactions_limit_premium": 5,
- "stories_venue_search_username": "foursquare",
- "story_caption_length_limit_default": 200,
- "story_caption_length_limit_premium": 2048,
- "story_expiring_limit_default": 3,
- "story_expiring_limit_premium": 100,
- "story_viewers_expire_period": 86400,
- "story_weather_preload": false,
- "telegram_antispam_group_size_min": 200,
- "telegram_antispam_user_id": "5434988373",
- "ton_proxy_address": "magic.org",
- "topics_pinned_limit": 5,
- "transcribe_audio_trial_duration_max": 300,
- "transcribe_audio_trial_weekly_number": 0,
- "upload_max_fileparts_default": 4000,
- "upload_max_fileparts_premium": 8000,
- "upload_premium_speedup_download": 10,
- "upload_premium_speedup_notify_period": 3600,
- "upload_premium_speedup_upload": 10,
- "url_auth_domains": [
+ "stars_gifts_enabled": true,
+ "stars_paid_post_amount_max": 2500,
+ "stars_paid_reaction_amount_max": 2500,
+ "stars_purchase_blocked": true,
+ "stars_revenue_withdrawal_min": 1000,
+ "stars_subscription_amount_max": 2500,
+ "stars_usd_sell_rate_x1000": 1410,
+ "stars_usd_withdraw_rate_x1000": 1300,
+ "stickers_emoji_cache_time": 86400,
+ "stickers_emoji_suggest_only_api": false,
+ "stickers_faved_limit_default": 5,
+ "stickers_faved_limit_premium": 10,
+ "stickers_normal_by_emoji_per_premium_num": 3,
+ "stickers_premium_by_emoji_num": 0,
+ "stories_area_url_max": 3,
+ "stories_changelog_user_id": 777000,
+ "stories_entities": "premium",
+ "stories_pinned_to_top_count_max": 3,
+ "stories_posting": "enabled",
+ "stories_sent_monthly_limit_default": 30,
+ "stories_sent_monthly_limit_premium": 3000,
+ "stories_sent_weekly_limit_default": 7,
+ "stories_sent_weekly_limit_premium": 700,
+ "stories_stealth_cooldown_period": 10800,
+ "stories_stealth_future_period": 1500,
+ "stories_stealth_past_period": 300,
+ "stories_suggested_reactions_limit_default": 1,
+ "stories_suggested_reactions_limit_premium": 5,
+ "stories_venue_search_username": "foursquare",
+ "story_caption_length_limit_default": 200,
+ "story_caption_length_limit_premium": 2048,
+ "story_expiring_limit_default": 3,
+ "story_expiring_limit_premium": 100,
+ "story_viewers_expire_period": 86400,
+ "story_weather_preload": false,
+ "telegram_antispam_group_size_min": 200,
+ "telegram_antispam_user_id": "5434988373",
+ "ton_proxy_address": "magic.org",
+ "topics_pinned_limit": 5,
+ "transcribe_audio_trial_duration_max": 300,
+ "transcribe_audio_trial_weekly_number": 0,
+ "upload_max_fileparts_default": 4000,
+ "upload_max_fileparts_premium": 8000,
+ "upload_premium_speedup_download": 10,
+ "upload_premium_speedup_notify_period": 3600,
+ "upload_premium_speedup_upload": 10,
+ "url_auth_domains": [
"web.telegram.org",
"web.t.me",
"k.t.me",
"z.t.me",
"a.t.me"
],
- "video_ignore_alt_documents": false,
- "weather_search_username": "StoryWeatherBot",
- "web_app_allowed_protocols": [
+ "video_ignore_alt_documents": false,
+ "weather_search_username": "StoryWeatherBot",
+ "web_app_allowed_protocols": [
"http",
"https"
],
- "whitelisted_domains": [
+ "whitelisted_domains": [
"telegram.dog",
"telegram.me",
"telegram.org",
@@ -721,18 +721,6 @@ Suggestions
The API can return a set of useful suggestions for users of graphical clients.
Basic suggestions
-jsonObjectValue#c0de1bd9 key:string value:JSONValue = JSONObjectValue;
-
-jsonNull#3f6d7b68 = JSONValue;
-jsonBool#c7345e6a value:Bool = JSONValue;
-jsonNumber#2be0dfa4 value:double = JSONValue;
-jsonString#b71e767a value:string = JSONValue;
-jsonArray#f7444763 value:Vector<JSONValue> = JSONValue;
-jsonObject#99c1d49d value:Vector<JSONObjectValue> = JSONValue;
-
----functions---
-
-help.getAppConfig#61e3f854 hash:int = help.AppConfig;
The help.getAppConfig method returns a JSON object containing rapidly evolving, client-specific configuration parameters.
A full list of these parameters can be seen in the Client Configuration section », but we're mostly interested in the pending_suggestions
and autoarchive_setting_available
fields of the returned JSON object:
The autoarchive_setting_available
flag indicates whether clients can invoke account.setGlobalPrivacySettings with globalPrivacySettings.archive_and_mute_new_noncontact_peers = boolTrue
, to automatically archive and mute new incoming chats from non-contacts. (boolean)
diff --git a/data/web/telegram.org/js/main.js b/data/web/telegram.org/js/main.js
index 1b111a9368..898af98e24 100644
--- a/data/web/telegram.org/js/main.js
+++ b/data/web/telegram.org/js/main.js
@@ -384,14 +384,12 @@ function initScrollVideos(desktop) {
var index = 1;
var tgStickersCnt = document.querySelectorAll('.js-tgsticker_image').length;
- var preloadVideos = tgStickersCnt > 1 ? 0 : (tgStickersCnt ? 1 : 2);
- var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
+ var preloadVideos = tgStickersCnt ? 0 : 2;
for (var i = 0; i < pageVideos.length; i++) {
var videoEl = pageVideos[i];
videoEl.setAttribute('vindex', index++);
- var preloadValue = i >= preloadVideos ? (isSafari ? 'none' : 'metadata') : 'auto';
- videoEl.setAttribute('preload', preloadValue);
- videoEl.preload = preloadValue;
+ videoEl.setAttribute('preload', i >= preloadVideos ? 'metadata' : 'auto');
+ videoEl.preload = i >= preloadVideos ? 'metadata' : 'auto';
if (desktop) {
videoEl.removeAttribute('controls');
videoEl.autoplay = false;
@@ -401,15 +399,6 @@ function initScrollVideos(desktop) {
videoEl.playsinline = true;
videoEl.setAttribute('autoplay', 'autoplay');
videoEl.setAttribute('playsinline', 'playsinline');
- videoEl.controls = false;
- videoEl.removeAttribute('controls');
- }
- var posterUrl = videoEl.poster;
- if (posterUrl && isSafari) {
- videoEl.parentNode.style.background = "url('" + escapeHTML(posterUrl) + "') center no-repeat";
- videoEl.parentNode.style.backgroundSize = "cover";
- videoEl.parentNode.style.lineHeight = "0";
- videoPreloadPosterDimensions(videoEl, posterUrl);
}
}
if (!desktop) {
@@ -454,16 +443,6 @@ function checkScrollVideos() {
}
}
-function videoPreloadPosterDimensions(videoEl, posterUrl) {
- var img = new Image();
- img.onload = function () {
- if (img.width > 0 && img.height > 0) {
- videoEl.style.aspectRatio = img.width / img.height;
- }
- };
- img.src = posterUrl;
-}
-
function isVisibleEnough(boxOffset, boxSize, viewOffset, viewSize, boxThreshold, viewThreshold) {
var boxEnd = boxOffset + boxSize;
var viewEnd = viewOffset + viewSize;
@@ -654,16 +633,6 @@ function mainDemoVideoDoHover(videoLinkEl, isHover) {
}
}
-function mainInitLogo(logo_url) {
- var img = new Image();
- img.onload = function() {
- var logo = document.querySelector('div.tl_main_logo');
- logo.style.backgroundImage = 'url(\'' + logo_url + '\')';
- logo.classList.add('play');
- };
- img.src = logo_url;
-}
-
function mainInitTgStickers(options) {
options = options || {};
if (!RLottie.isSupported) {
@@ -704,12 +673,3 @@ function getCookie(name) {
}
return null;
}
-
-function mainScrollTo(element) {
- if (typeof element === 'string') {
- element = document.querySelector(element)
- }
- if (element) {
- window.scroll(0, getFullOffsetY(element));
- }
-}