Fix Video Unavailable problem at YouTube preview (#26980)
* Fix YouTube preview shows Video Unavailable * Fix typo on iframe property * Remove duplicated property * fix lint error (double-quotes, unknown property) * renew snapshot for youtube_video.tsx * fix double quotes and newline error on snapshot for youtube_video.tsx * fix blank on snapshot for youtube_video.tsx * Add YouTube Shorts Embed Preview * Revert "Add YouTube Shorts Embed Preview" This reverts commit b5fb7a4076ef73774a0e50157f371516b9d383b2. * Add setting for Youtube Referrer Policy * fix test code error about Youtube Referrer Policy * remove mistake changes on `webpack.config.js` * add test and snapshot about `youtubeReferrerPolicy = true` * fix errors on ci * update description of YouTube Referrer Policy * remove unnecessary whitespace in default_config.ts * remove ko.json changes to prevent conflict with translate tool * update snapshot of `youtube_video.test.tsx` * referrerPolicy on `youtube_video` didn't follow global policy value https://github.com/mattermost/mattermost/pull/26980#discussion_r1672524152 * update snapshot of `youtube_video.test.tsx` * Remove obsolete snapshot * fix typo on index.ts @ youtube_video --------- Co-authored-by: Mattermost Build <build@mattermost.com> Co-authored-by: Harrison Healey <harrisonmhealey@gmail.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
0d6b1070a2
Коммит
283f59b479
@@ -142,6 +142,7 @@ func GenerateClientConfig(c *model.Config, telemetryID string, license *model.Li
|
||||
props["PersistentNotificationMaxRecipients"] = strconv.FormatInt(int64(*c.ServiceSettings.PersistentNotificationMaxRecipients), 10)
|
||||
props["AllowSyncedDrafts"] = strconv.FormatBool(*c.ServiceSettings.AllowSyncedDrafts)
|
||||
props["DelayChannelAutocomplete"] = strconv.FormatBool(*c.ExperimentalSettings.DelayChannelAutocomplete)
|
||||
props["YoutubeReferrerPolicy"] = strconv.FormatBool(*c.ExperimentalSettings.YoutubeReferrerPolicy)
|
||||
props["UniqueEmojiReactionLimitPerPost"] = strconv.FormatInt(int64(*c.ServiceSettings.UniqueEmojiReactionLimitPerPost), 10)
|
||||
|
||||
props["WranglerPermittedWranglerRoles"] = strings.Join(c.WranglerSettings.PermittedWranglerRoles, ",")
|
||||
|
||||
@@ -778,6 +778,7 @@ func (ts *TelemetryService) trackConfig() {
|
||||
"enable_app_bar": !*cfg.ExperimentalSettings.DisableAppBar,
|
||||
"disable_refetching_on_browser_focus": *cfg.ExperimentalSettings.DisableRefetchingOnBrowserFocus,
|
||||
"delay_channel_autocomplete": *cfg.ExperimentalSettings.DelayChannelAutocomplete,
|
||||
"youtube_referrer_policy": *cfg.ExperimentalSettings.YoutubeReferrerPolicy,
|
||||
})
|
||||
|
||||
ts.SendTelemetry(TrackConfigAnalytics, map[string]any{
|
||||
|
||||
@@ -1075,6 +1075,7 @@ type ExperimentalSettings struct {
|
||||
DelayChannelAutocomplete *bool `access:"experimental_features"`
|
||||
DisableWakeUpReconnectHandler *bool `access:"experimental_features"`
|
||||
UsersStatusAndProfileFetchingPollIntervalMilliseconds *int64 `access:"experimental_features"`
|
||||
YoutubeReferrerPolicy *bool `access:"experimental_features"`
|
||||
}
|
||||
|
||||
func (s *ExperimentalSettings) SetDefaults() {
|
||||
@@ -1121,6 +1122,10 @@ func (s *ExperimentalSettings) SetDefaults() {
|
||||
if s.UsersStatusAndProfileFetchingPollIntervalMilliseconds == nil {
|
||||
s.UsersStatusAndProfileFetchingPollIntervalMilliseconds = NewPointer(int64(ExperimentalSettingsDefaultUsersStatusAndProfileFetchingPollIntervalMilliseconds))
|
||||
}
|
||||
|
||||
if s.YoutubeReferrerPolicy == nil {
|
||||
s.YoutubeReferrerPolicy = NewBool(false)
|
||||
}
|
||||
}
|
||||
|
||||
type AnalyticsSettings struct {
|
||||
|
||||
Ссылка в новой задаче
Block a user