[Video] Don't require email verification on self-host (#5332)
parent
843f9925f5
commit
533382173c
|
@ -13,6 +13,8 @@ import {useVideoLibraryPermission} from '#/lib/hooks/usePermissions'
|
||||||
import {isNative} from '#/platform/detection'
|
import {isNative} from '#/platform/detection'
|
||||||
import {useModalControls} from '#/state/modals'
|
import {useModalControls} from '#/state/modals'
|
||||||
import {useSession} from '#/state/session'
|
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 {atoms as a, useTheme} from '#/alf'
|
||||||
import {Button} from '#/components/Button'
|
import {Button} from '#/components/Button'
|
||||||
import {VideoClip_Stroke2_Corner0_Rounded as VideoClipIcon} from '#/components/icons/VideoClip'
|
import {VideoClip_Stroke2_Corner0_Rounded as VideoClipIcon} from '#/components/icons/VideoClip'
|
||||||
|
@ -38,7 +40,12 @@ export function SelectVideoBtn({onSelectVideo, disabled, setError}: Props) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!currentAccount?.emailConfirmed) {
|
if (
|
||||||
|
currentAccount &&
|
||||||
|
!currentAccount.emailConfirmed &&
|
||||||
|
getHostnameFromUrl(currentAccount.service) ===
|
||||||
|
getHostnameFromUrl(BSKY_SERVICE)
|
||||||
|
) {
|
||||||
Keyboard.dismiss()
|
Keyboard.dismiss()
|
||||||
control.open()
|
control.open()
|
||||||
} else {
|
} else {
|
||||||
|
@ -71,12 +78,12 @@ export function SelectVideoBtn({onSelectVideo, disabled, setError}: Props) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, [
|
}, [
|
||||||
onSelectVideo,
|
|
||||||
requestVideoAccessIfNeeded,
|
requestVideoAccessIfNeeded,
|
||||||
|
currentAccount,
|
||||||
|
control,
|
||||||
setError,
|
setError,
|
||||||
_,
|
_,
|
||||||
control,
|
onSelectVideo,
|
||||||
currentAccount?.emailConfirmed,
|
|
||||||
])
|
])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
Loading…
Reference in New Issue