From 6bd36e408c5abcbac9c21fcbfb6a7c400ba470ff Mon Sep 17 00:00:00 2001 From: Mario Danic Date: Tue, 3 Sep 2019 09:52:14 +0200 Subject: [PATCH] Fix #611 Signed-off-by: Mario Danic --- .../talk/controllers/bottomsheet/EntryMenuController.java | 4 ++-- .../controllers/bottomsheet/OperationsMenuController.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/com/nextcloud/talk/controllers/bottomsheet/EntryMenuController.java b/app/src/main/java/com/nextcloud/talk/controllers/bottomsheet/EntryMenuController.java index ccce0ab8c..cfe7c2c28 100644 --- a/app/src/main/java/com/nextcloud/talk/controllers/bottomsheet/EntryMenuController.java +++ b/app/src/main/java/com/nextcloud/talk/controllers/bottomsheet/EntryMenuController.java @@ -228,8 +228,8 @@ public class EntryMenuController extends BaseController { proceedButton.setAlpha(1.0f); } textInputLayout.setErrorEnabled(false); - } else if (editText.getText().toString().startsWith("http://") || - editText.getText().toString().startsWith("https://") && + } else if ((editText.getText().toString().startsWith("http://") || + editText.getText().toString().startsWith("https://")) && editText.getText().toString().contains("/call/")) { // operation code 10 if (!proceedButton.isEnabled()) { diff --git a/app/src/main/java/com/nextcloud/talk/controllers/bottomsheet/OperationsMenuController.java b/app/src/main/java/com/nextcloud/talk/controllers/bottomsheet/OperationsMenuController.java index 5f68a6e3d..87a1dfe50 100644 --- a/app/src/main/java/com/nextcloud/talk/controllers/bottomsheet/OperationsMenuController.java +++ b/app/src/main/java/com/nextcloud/talk/controllers/bottomsheet/OperationsMenuController.java @@ -171,8 +171,8 @@ public class OperationsMenuController extends BaseController { currentUser = userUtils.getCurrentUser(); OperationsObserver operationsObserver = new OperationsObserver(); - if (!TextUtils.isEmpty(callUrl)) { - conversationToken = callUrl.substring(callUrl.lastIndexOf("/") + 1, callUrl.length()); + if (!TextUtils.isEmpty(callUrl) && callUrl.contains("/call")) { + conversationToken = callUrl.substring(callUrl.lastIndexOf("/") + 1); if (callUrl.contains("/index.php")) { baseUrl = callUrl.substring(0, callUrl.indexOf("/index.php")); } else {