Skip to content

Commit

Permalink
Restrict video link workaround to Discord&Telegram (#1062)
Browse files Browse the repository at this point in the history
Co-authored-by: dangered wolf <[email protected]>
  • Loading branch information
sfan5 and dangeredwolf authored Nov 30, 2024
1 parent f841360 commit 5eccf42
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/render/video.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ export const renderVideo = (

if (
status.provider !== DataProvider.Bsky &&
experimentCheck(Experiment.DISCORD_VIDEO_REDIRECT_WORKAROUND, !!Constants.API_HOST_LIST)
experimentCheck(Experiment.DISCORD_VIDEO_REDIRECT_WORKAROUND, !!Constants.API_HOST_LIST) &&
(userAgent?.includes('Discord') || userAgent?.includes('Telegram'))
) {
url = `https://${Constants.API_HOST_LIST[0]}/2/go?url=${encodeURIComponent(url)}`;
}
Expand Down

0 comments on commit 5eccf42

Please sign in to comment.