about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorHailey <me@haileyok.com>2024-09-13 14:08:45 -0700
committerGitHub <noreply@github.com>2024-09-13 14:08:45 -0700
commit533382173c498a382c5192bb7829da7ac900d7e3 (patch)
tree5ad4ec3ef9c367bb163c734eef4f7a3cdeab2af6 /src
parent843f9925f5d0773db321e617c1bd0be6a308ef7f (diff)
downloadvoidsky-533382173c498a382c5192bb7829da7ac900d7e3.tar.zst
[Video] Don't require email verification on self-host (#5332)
Diffstat (limited to 'src')
-rw-r--r--src/view/com/composer/videos/SelectVideoBtn.tsx15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/view/com/composer/videos/SelectVideoBtn.tsx b/src/view/com/composer/videos/SelectVideoBtn.tsx
index da67d781e..2f2b4c3e7 100644
--- a/src/view/com/composer/videos/SelectVideoBtn.tsx
+++ b/src/view/com/composer/videos/SelectVideoBtn.tsx
@@ -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'
@@ -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 {
@@ -71,12 +78,12 @@ export function SelectVideoBtn({onSelectVideo, disabled, setError}: Props) {
       }
     }
   }, [
-    onSelectVideo,
     requestVideoAccessIfNeeded,
+    currentAccount,
+    control,
     setError,
     _,
-    control,
-    currentAccount?.emailConfirmed,
+    onSelectVideo,
   ])
 
   return (