diff --git a/src/status_im/router/core.cljs b/src/status_im/router/core.cljs index 45b8689a8a82..e260d551f2a2 100644 --- a/src/status_im/router/core.cljs +++ b/src/status_im/router/core.cljs @@ -107,7 +107,7 @@ (= handler :community-chat) (:community-data route-params) (string? (:community-data route-params)) - (string/includes? (:community-data route-params) "-")) + (re-find constants/regx-starts-with-uuid (:community-data route-params))) (assoc-in [:route-params :community-channel-id] (:community-data route-params)) (and equal-end-of-base64url (= handler :user) (:user-data route-params)) diff --git a/src/status_im2/constants.cljs b/src/status_im2/constants.cljs index bfa08d2e0dd6..dd76b205ab48 100644 --- a/src/status_im2/constants.cljs +++ b/src/status_im2/constants.cljs @@ -184,6 +184,7 @@ (def regx-ens #"^(?=.{5,255}$)([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.[a-zA-Z]{2,}$") (def regx-address #"^0x[a-fA-F0-9]{40}$") (def regx-address-contains #"(?i)0x[a-fA-F0-9]{40}") +(def regx-starts-with-uuid #"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}") (def ^:const dapp-permission-contact-code "contact-code") (def ^:const dapp-permission-web3 "web3")