From 357123743f52fae380c18a89b31b2e550a3b5a8c Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Mon, 5 Aug 2019 17:59:33 +0200 Subject: [PATCH] Search firstIndexOf, because server url can contains port (This is what JS does, but Riot Android is also bugged) --- .../main/java/im/vector/matrix/android/api/MatrixPatterns.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/MatrixPatterns.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/MatrixPatterns.kt index 48e50eca..93540829 100644 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/MatrixPatterns.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/MatrixPatterns.kt @@ -149,7 +149,7 @@ object MatrixPatterns { return null } - val index = matrixId.lastIndexOf(":") + val index = matrixId.indexOf(":") return if (index == -1) { null