Skip to content

Commit

Permalink
[Video] Don't require email verification on self-host (#5332)
Browse files Browse the repository at this point in the history
  • Loading branch information
haileyok authored Sep 13, 2024
1 parent 843f992 commit 5333821
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/view/com/composer/videos/SelectVideoBtn.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import {useVideoLibraryPermission} from '#/lib/hooks/usePermissions'
import {isNative} from '#/platform/detection'
import {useModalControls} from '#/state/modals'
import {useSession} from '#/state/session'
import {BSKY_SERVICE} from 'lib/constants'
import {getHostnameFromUrl} from 'lib/strings/url-helpers'
import {atoms as a, useTheme} from '#/alf'
import {Button} from '#/components/Button'
import {VideoClip_Stroke2_Corner0_Rounded as VideoClipIcon} from '#/components/icons/VideoClip'
Expand All @@ -38,7 +40,12 @@ export function SelectVideoBtn({onSelectVideo, disabled, setError}: Props) {
return
}

if (!currentAccount?.emailConfirmed) {
if (
currentAccount &&
!currentAccount.emailConfirmed &&
getHostnameFromUrl(currentAccount.service) ===
getHostnameFromUrl(BSKY_SERVICE)
) {
Keyboard.dismiss()
control.open()
} else {
Expand Down Expand Up @@ -71,12 +78,12 @@ export function SelectVideoBtn({onSelectVideo, disabled, setError}: Props) {
}
}
}, [
onSelectVideo,
requestVideoAccessIfNeeded,
currentAccount,
control,
setError,
_,
control,
currentAccount?.emailConfirmed,
onSelectVideo,
])

return (
Expand Down

0 comments on commit 5333821

Please sign in to comment.