Skip to content

Commit bb142b6

Browse files
authored
Merge pull request #9033 from element-hq/feature/bma/filterMobileLink
Filter mobile link
2 parents 40dbff8 + 02e93fd commit bb142b6

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

changelog.d/9033.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Filter mobile links: only open links which have an explicit empty path like `https://mobile.element.io/?hs_url=...`
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/usr/bin/env bash
22

3-
adb shell am start -a android.intent.action.VIEW -d "https://mobile.element.io?hs_url=https%3A%2F%2Fmozilla-test.modular.im"
3+
adb shell am start -a android.intent.action.VIEW -d "https://mobile.element.io/?hs_url=https%3A%2F%2Felement.io"

vector/src/main/AndroidManifest.xml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,17 @@
206206
<data android:host="develop.element.io" />
207207
<!-- Matching asset file: https://staging.element.io/.well-known/assetlinks.json -->
208208
<data android:host="staging.element.io" />
209-
<!-- Fix it https://github.com/element-hq/element-android/issues/8904 -->
209+
</intent-filter>
210+
<intent-filter android:autoVerify="true">
211+
<action android:name="android.intent.action.VIEW" />
212+
213+
<category android:name="android.intent.category.DEFAULT" />
214+
<category android:name="android.intent.category.BROWSABLE" />
215+
216+
<data android:scheme="https" />
210217
<data android:host="mobile.element.io" />
218+
<!-- accept only root path -->
219+
<data android:path="/" />
211220
</intent-filter>
212221
</activity>
213222

0 commit comments

Comments
 (0)