Compare commits

...
22 changed files with 65 additions and 65 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ These are just guidelines, not rules. Use your best judgment, and feel free to p
* [Mission and Principles](https://status.im/about)
* [Read our FAQ](https://status.im/docs/FAQs.html)
* [Join our Chat](http://join.status.im/chat/public/status-core-dev)
* [Join our Chat](http://status.app/chat/public/status-core-dev)
* [Developer Introduction](https://status.im/developer_tools/)
* [Build Status Yourself](https://status.im/technical/build_status)
* [Find issues to work on](https://github.com/status-im/)
+2 -2
View File
@@ -62,8 +62,8 @@
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="http" android:host="join.status.im" />
<data android:scheme="https" android:host="join.status.im" />
<data android:scheme="http" android:host="status.app" />
<data android:scheme="https" android:host="status.app" />
</intent-filter>
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
+1 -1
View File
@@ -11,7 +11,7 @@
<string>development</string>
<key>com.apple.developer.associated-domains</key>
<array>
<string>applinks:join.status.im</string>
<string>applinks:status.app</string>
</array>
<key>keychain-access-groups</key>
<array>
+1 -1
View File
@@ -11,7 +11,7 @@
<string>development</string>
<key>com.apple.developer.associated-domains</key>
<array>
<string>applinks:join.status.im</string>
<string>applinks:status.app/string>
</array>
<key>keychain-access-groups</key>
<array>
+1 -1
View File
@@ -22,7 +22,7 @@
(def web-prefixes ["https://" "http://" "https://www." "http://wwww."])
(def web2-domain "join.status.im")
(def web2-domain "status.app")
(def web-urls (map #(str % web2-domain "/") web-prefixes))
+5 -5
View File
@@ -30,20 +30,20 @@
(str "status-im://g/args?a=" public-key "&a1=" chat-name-url "&a2=" chat-id)
[:group-chat {:params "arg"} {"a" public-key "a1" chat-name "a2" chat-id}]
(str "https://join.status.im/g/args?a=" public-key "&a1=" chat-name-url "&a2=" chat-id)
(str "https://status.app/g/args?a=" public-key "&a1=" chat-name-url "&a2=" chat-id)
[:group-chat {:params "arg"} {"a" public-key "a1" chat-name "a2" chat-id}]
"https://join.status.im/u/statuse2e"
"https://status.app/u/statuse2e"
[:user {:user-id "statuse2e"}]
(str "https://join.status.im/user/" public-key)
(str "https://status.app/user/" public-key)
[:user {:user-id public-key}]
;; Last char removed by: https://github.com/juxt/bidi/issues/104
"https://join.status.im/b/www.cryptokitties.co"
"https://status.app/b/www.cryptokitties.co"
[:browser {:domain "www.cryptokitties.c"}]
"https://join.status.im/b/https://www.google.com/"
"https://status.app/b/https://www.google.com/"
[:browser {:domain "https://www.google.co"}]
"ethereum:0x89205a3a3b2a69de6dbf7f01ed13b2108b2c43e7"
@@ -20,7 +20,7 @@
;; domains should be without the trailing slash
(def domains
{:external "https://join.status.im"
{:external "https://status.app"
:internal "status-im:/"})
(def links
@@ -19,9 +19,9 @@
(is (nil? (get-in (links/handle-url {:db db} "some-url")
[:db :universal-links/url]))))
(testing "Handle a custom string"
(is (= (get-in (links/handle-url {:db db} "https://join.status.im/u/statuse2e")
(is (= (get-in (links/handle-url {:db db} "https://status.app/u/statuse2e")
[::router/handle-uri :uri])
"https://join.status.im/u/statuse2e")))))))
"https://status.app/u/statuse2e")))))))
(deftest url-event-listener
(testing "the url is not nil"
@@ -4,7 +4,7 @@
;; domains should be without the trailing slash
(def domains
{:external "https://join.status.im"
{:external "https://status.app"
:internal "status-im:/"})
(def links
@@ -12,15 +12,15 @@
(testing "ethereum:0x89205a3a3b2a69de6dbf7f01ed13b2108b2c43e7"
(testing "it returns true"
(is (links/deep-link? "ethereum:0x89205a3a3b2a69de6dbf7f01ed13b2108b2c43e7"))))
(testing "http://join.status.im/blah"
(testing "http://status.app/blah"
(testing "it returns true"
(is (links/universal-link? "http://join.status.im/blah"))))
(testing "https://join.status.im/blah"
(is (links/universal-link? "http://status.app/blah"))))
(testing "https://status.app/blah"
(testing "it returns true"
(is (links/universal-link? "https://join.status.im/blah"))))
(is (links/universal-link? "https://status.app/blah"))))
(testing "unicode characters"
(testing "it returns false"
(is (not (links/universal-link? "https://join.status.im/browse/www.аррӏе.com")))))
(is (not (links/universal-link? "https://status.app/browse/www.аррӏе.com")))))
(testing "not-status-im://blah"
(testing "it returns false"
(is (not (links/universal-link? "https://not.status.im/blah")))))
@@ -30,6 +30,6 @@
(testing "https://not.status.im/blah"
(testing "it returns false"
(is (not (links/universal-link? "https://not.status.im/blah")))))
(testing "http://join.status.im/blah"
(testing "http://status.app/blah"
(testing "it returns false"
(is (not (links/deep-link? "http://join.status.im/blah"))))))
(is (not (links/deep-link? "http://status.app/blah"))))))
+2 -2
View File
@@ -179,8 +179,8 @@
(def regx-bold #"\*[^*]+\*")
(def regx-italic #"~[^~]+~")
(def regx-backquote #"`[^`]+`")
(def regx-universal-link #"((^https?://join.status.im/)|(^status-im://))[\x00-\x7F]+$")
(def regx-community-universal-link #"((^https?://join.status.im/)|(^status-im://))c/([\x00-\x7F]+)$")
(def regx-universal-link #"((^https?://status.app/)|(^status-im://))[\x00-\x7F]+$")
(def regx-community-universal-link #"((^https?://status.app/)|(^status-im://))c/([\x00-\x7F]+)$")
(def regx-deep-link #"((^ethereum:.*)|(^status-im://[\x00-\x7F]+$))")
(def ^:const dapp-permission-contact-code "contact-code")
@@ -33,7 +33,7 @@
(zipmap (repeat nil))))
([kv] (-> (init-contact) (merge kv))))
(def url-regex #"^https?://join.status.im/u/(.+)")
(def url-regex #"^https?://status.app/u/(.+)")
(defn ->id
[{:keys [input] :as contact}]
@@ -10,8 +10,8 @@
(def ckey "zQ3shWj4WaBdf2zYKCkXe6PHxDxNTzZyid1i75879Ue9cX9gA")
(def ens "esep")
(def ens-stateofus-eth (str ens ".stateofus.eth"))
(def link-ckey (str "https://join.status.im/u/" ckey))
(def link-ens (str "https://join.status.im/u/" ens))
(def link-ckey (str "https://status.app/u/" ckey))
(def link-ens (str "https://status.app/u/" ens))
;;; unit tests (no app-db involved)
@@ -9,7 +9,7 @@
(defn community-link
[id]
(str "https://join.status.im/c/" id))
(str "https://status.app/c/" id))
(rf/defn cache-link-preview-data
{:events [:chat.ui/cache-link-preview-data]}
+2 -2
View File
@@ -17,11 +17,11 @@
(defn get-abbreviated-profile-url
"The goal here is to generate a string that begins with
join.status.im/u/ joined with the 1st 5 characters
status.app/u/ joined with the 1st 5 characters
of the compressed public key followed by an ellipsis followed by
the last 12 characters of the compressed public key"
[base-url public-key]
(if (and public-key base-url (> (count public-key) 17) (= "join.status.im/u/" base-url))
(if (and public-key base-url (> (count public-key) 17) (= "status.app/u/" base-url))
(let [first-part-of-public-pk (subs public-key 0 5)
ellipsis "..."
public-key-size (count public-key)
+7 -7
View File
@@ -21,22 +21,22 @@
(deftest test-get-abbreviated-profile-url
(testing "Ensure the function correctly generates an abbreviated profile URL for a valid public key"
(is (= "join.status.im/u/zQ3sh...aimrdYpzeFUa"
(is (= "status.app/u/zQ3sh...aimrdYpzeFUa"
(utils.address/get-abbreviated-profile-url
"join.status.im/u/"
"status.app/u/"
"zQ3shPrnUhhR42JJn3QdhodGest8w8MjiH8hPaimrdYpzeFUa"))))
(testing "Ensure the function returns nil when given an empty public key"
(is (nil? (utils.address/get-abbreviated-profile-url "join.status.im/u/" ""))))
(is (nil? (utils.address/get-abbreviated-profile-url "status.app/u/" ""))))
(testing "Ensure the function returns nil when given a nil public key"
(is (nil? (utils.address/get-abbreviated-profile-url "join.status.im/u/" nil))))
(is (nil? (utils.address/get-abbreviated-profile-url "status.app/u/" nil))))
(testing "Ensure the function returns nil when given an incorrect base URL"
(is (nil? (utils.address/get-abbreviated-profile-url
"join.status.im/uwu/"
"status.app/uwu/"
"zQ3shPrnUhhR42JJn3QdhodGest8w8MjiH8hPaimrdYpzeFUa"))))
(testing "Ensure the function returns nil when given a public key shorter than 17 characters"
(is (nil? (utils.address/get-abbreviated-profile-url "join.status.im/u/" "abc")))
(is (nil? (utils.address/get-abbreviated-profile-url "join.status.im/u/" "1234")))))
(is (nil? (utils.address/get-abbreviated-profile-url "status.app/u/" "abc")))
(is (nil? (utils.address/get-abbreviated-profile-url "status.app/u/" "1234")))))
+2 -2
View File
@@ -11,8 +11,8 @@
(def ^:const account-initials-action "/accountInitials")
(def ^:const contact-images-action "/contactImages")
(def ^:const generate-qr-action "/GenerateQRCode")
(def ^:const status-profile-base-url "https://join.status.im/u/")
(def ^:const status-profile-base-url-without-https "join.status.im/u/")
(def ^:const status-profile-base-url "https://status.app/u/")
(def ^:const status-profile-base-url-without-https "status.app/u/")
(defn get-font-file-ready
"setup font file and get the absolute path to it
@@ -191,7 +191,7 @@ class TestBrowserProfileOneDevice(MultipleSharedDeviceTestCase):
self.home.just_fyi("Check it via 'Invite friends' on home view")
self.home.invite_friends_button.click()
self.home.share_via_messenger()
if not self.home.element_by_text_part('Hey join me on Status: https://join.status.im/u/%s' % chat_key).is_element_displayed(20):
if not self.home.element_by_text_part('Hey join me on Status: https://status.app/u/%s' % chat_key).is_element_displayed(20):
self.errors.append("No expected message in input field when sharing via 'Invite friend'")
self.home.click_system_back_button_until_element_is_shown()
@@ -199,7 +199,7 @@ class TestBrowserProfileOneDevice(MultipleSharedDeviceTestCase):
self.home.plus_button.click()
self.home.chats_menu_invite_friends_button.click()
self.home.share_via_messenger()
if not self.home.element_by_text_part('Hey join me on Status: https://join.status.im/u/%s' % chat_key).is_element_displayed(20):
if not self.home.element_by_text_part('Hey join me on Status: https://status.app/u/%s' % chat_key).is_element_displayed(20):
self.errors.append("No expected message in input field when sharing via 'bottom sheet'")
self.home.click_system_back_button_until_element_is_shown()
self.errors.verify_no_errors()
@@ -215,7 +215,7 @@ class TestBrowserProfileOneDevice(MultipleSharedDeviceTestCase):
users = {
'scanning_ens_with_stateofus_domain_deep_link': {
'contact_code': 'https://join.status.im/u/%s.stateofus.eth' % ens_user_message_sender['ens'],
'contact_code': 'https://status.app/u/%s.stateofus.eth' % ens_user_message_sender['ens'],
'username': ens_user_message_sender['username']
},
'scanning_public_key': {
@@ -96,7 +96,7 @@ class TestDeeplinkChatProfileOneDevice(MultipleSharedDeviceTestCase):
chat.share_button.click()
chat.share_via_messenger()
if not chat.element_by_text_part(
'https://join.status.im/u/%s' % dummy_user["public_key"]).is_element_displayed():
'https://status.app/u/%s' % dummy_user["public_key"]).is_element_displayed():
self.errors.append("Can't share public key of contact")
for _ in range(2):
chat.click_system_back_button_until_element_is_shown()
@@ -112,7 +112,7 @@ class TestDeeplinkChatProfileOneDevice(MultipleSharedDeviceTestCase):
self.public_chat.share_chat_button.click()
self.public_chat.share_via_messenger()
if not self.public_chat.element_by_text_part(
'https://join.status.im/%s' % self.public_chat_name).is_element_displayed():
'https://status.app/%s' % self.public_chat_name).is_element_displayed():
self.errors.append("Can't share link to public chat")
for _ in range(2):
self.public_chat.click_system_back_button_until_element_is_shown()
@@ -127,8 +127,8 @@ class TestDeeplinkChatProfileOneDevice(MultipleSharedDeviceTestCase):
browser.options_button.click()
browser.share_url_button.click()
browser.share_via_messenger()
expeceted_text_1 = 'https://join.status.im/b/https://dap.ps'
expeceted_text_2 = 'https://join.status.im/b/http://dap.ps'
expeceted_text_1 = 'https://status.app/b/https://dap.ps'
expeceted_text_2 = 'https://status.app/b/http://dap.ps'
if not (browser.element_by_text_part(expeceted_text_1).is_element_displayed() or
browser.element_by_text_part(expeceted_text_2).is_element_displayed()):
@@ -389,11 +389,11 @@ class TestDeeplinkChatProfileOneDevice(MultipleSharedDeviceTestCase):
# url_data = {
# 'ens_with_stateofus_domain_deep_link': {
# 'url': 'https://join.status.im/u/%s.stateofus.eth' % ens_user_message_sender['ens'],
# 'url': 'https://status.app/u/%s.stateofus.eth' % ens_user_message_sender['ens'],
# 'username': '@%s' % ens_user_message_sender['ens']
# },
# 'ens_without_stateofus_domain_deep_link': {
# 'url': 'https://join.status.im/u/%s' % ens_user_message_sender['ens'],
# 'url': 'https://status.app/u/%s' % ens_user_message_sender['ens'],
# 'username': '@%s' % ens_user_message_sender['ens']
# },
# 'ens_another_domain_deep_link': {
@@ -401,15 +401,15 @@ class TestDeeplinkChatProfileOneDevice(MultipleSharedDeviceTestCase):
# 'username': '@%s' % ens_user['ens']
# },
# 'own_profile_key_deep_link': {
# 'url': 'https://join.status.im/u/%s' % self.public_key,
# 'url': 'https://status.app/u/%s' % self.public_key,
# 'error': "That's you"
# },
# 'other_user_profile_key_deep_link': {
# 'url': 'https://join.status.im/u/%s' % transaction_senders['M']['public_key'],
# 'url': 'https://status.app/u/%s' % transaction_senders['M']['public_key'],
# 'username': transaction_senders['M']['username']
# },
# 'other_user_profile_key_deep_link_invalid': {
# 'url': 'https://join.status.im/u/%sinvalid' % ens_user['public_key'],
# 'url': 'https://status.app/u/%sinvalid' % ens_user['public_key'],
# 'error': 'Please enter or scan a valid chat key'
# },
# 'own_profile_key': {
@@ -155,11 +155,11 @@ class TestPermissionsScanQrOneDevice(MultipleSharedDeviceTestCase):
url_data = {
'ens_with_stateofus_domain_deep_link': {
'url': 'https://join.status.im/u/%s.stateofus.eth' % ens_user_message_sender['ens'],
'url': 'https://status.app/u/%s.stateofus.eth' % ens_user_message_sender['ens'],
'username': '@%s' % ens_user_message_sender['ens']
},
'ens_without_stateofus_domain_deep_link': {
'url': 'https://join.status.im/u/%s' % ens_user_message_sender['ens'],
'url': 'https://status.app/u/%s' % ens_user_message_sender['ens'],
'username': '@%s' % ens_user_message_sender['ens']
},
'ens_another_domain_deep_link': {
@@ -167,15 +167,15 @@ class TestPermissionsScanQrOneDevice(MultipleSharedDeviceTestCase):
'username': '@%s' % ens_user['ens']
},
'own_profile_key_deep_link': {
'url': 'https://join.status.im/u/%s' % self.public_key,
'url': 'https://status.app/u/%s' % self.public_key,
'error': "That's you"
},
'other_user_profile_key_deep_link': {
'url': 'https://join.status.im/u/%s' % transaction_senders['M']['public_key'],
'url': 'https://status.app/u/%s' % transaction_senders['M']['public_key'],
'username': transaction_senders['M']['username']
},
'other_user_profile_key_deep_link_invalid': {
'url': 'https://join.status.im/u/%sinvalid' % ens_user['public_key'],
'url': 'https://status.app/u/%sinvalid' % ens_user['public_key'],
'error': 'Please enter or scan a valid chat key'
},
'own_profile_key': {
@@ -225,7 +225,7 @@ class TestPermissionsScanQrOneDevice(MultipleSharedDeviceTestCase):
url_data = {
'ens_without_stateofus_domain_deep_link': {
'url': 'https://join.status.im/u/%s' % ens_user_message_sender['ens'],
'url': 'https://status.app/u/%s' % ens_user_message_sender['ens'],
'username': '@%s' % ens_user_message_sender['ens']
},
@@ -234,7 +234,7 @@ class TestPermissionsScanQrOneDevice(MultipleSharedDeviceTestCase):
'username': basic_user['username']
},
'other_user_profile_key_deep_link_invalid': {
'url': 'https://join.status.im/u/%sinvalid' % ens_user['public_key'],
'url': 'https://status.app/u/%sinvalid' % ens_user['public_key'],
'error': 'Unable to read this code'
},
'own_profile_key': {
@@ -265,13 +265,13 @@ class TestPermissionsScanQrOneDevice(MultipleSharedDeviceTestCase):
},
},
'dapp_deep_link': {
'url': 'https://join.status.im/b/%s' % test_dapp_url,
'url': 'https://status.app/b/%s' % test_dapp_url,
},
'dapp_deep_link_https': {
'url': 'https://join.status.im/b/%s' % test_dapp_url,
'url': 'https://status.app/b/%s' % test_dapp_url,
},
'public_chat_deep_link': {
'url': 'https://join.status.im/baga-ma-2020',
'url': 'https://status.app/baga-ma-2020',
'chat_name': 'baga-ma-2020'
},
}
+2 -2
View File
@@ -442,8 +442,8 @@ class CommunityView(HomeView):
self.driver.info("Copy community link")
self.community_options_button.click()
self.community_info_button.click()
self.element_starts_with_text('join.status.im/c/').click()
community_link_text = self.element_starts_with_text('join.status.im/c/').text
self.element_starts_with_text('status.app/c/').click()
community_link_text = self.element_starts_with_text('status.app/c/').text
self.home_button.double_click()
return 'https://%s' % community_link_text
+2 -2
View File
@@ -4,7 +4,7 @@ main = {
'messages': {
'text': 'before upgrade',
'reply': 'reply',
'invite': 'https://join.status.im/g/args?a=0x04359bb3e73cba0b815d71e562670ad00bb5d2db0d16cd1c4c92c668b61fde2274d6e487fcdffe66f913b3fea2a3058f53ce7946c2b501aa61a9ca8a883df72dc9&a1=empty&a2=a935c4fa-5530-407c-84c2-61512120d504-0x04359bb3e73cba0b815d71e562670ad00bb5d2db0d16cd1c4c92c668b61fde2274d6e487fcdffe66f913b3fea2a3058f53ce7946c2b501aa61a9ca8a883df72dc9'
'invite': 'https://status.app/g/args?a=0x04359bb3e73cba0b815d71e562670ad00bb5d2db0d16cd1c4c92c668b61fde2274d6e487fcdffe66f913b3fea2a3058f53ce7946c2b501aa61a9ca8a883df72dc9&a1=empty&a2=a935c4fa-5530-407c-84c2-61512120d504-0x04359bb3e73cba0b815d71e562670ad00bb5d2db0d16cd1c4c92c668b61fde2274d6e487fcdffe66f913b3fea2a3058f53ce7946c2b501aa61a9ca8a883df72dc9'
}
}
to_join = {
@@ -32,7 +32,7 @@ make_admin = {
}
timeline = {
'link': 'https://join.status.im/u/0x045efbcc044e5ae21ac3cf111ea6df6186e0cc50a2cd747f52a56d19ce516e683c66cb47f4b0a21110859aea9592dfba1e0bf4af11ff3eab995f844b3673643bf1',
'link': 'https://status.app/u/0x045efbcc044e5ae21ac3cf111ea6df6186e0cc50a2cd747f52a56d19ce516e683c66cb47f4b0a21110859aea9592dfba1e0bf4af11ff3eab995f844b3673643bf1',
'text': 'Hey there!',
'resolved_username': ens_user_message_sender['username']