From 7ae541330820fdb023b049dcf133ba1202e450a9 Mon Sep 17 00:00:00 2001 From: Marcel Hibbe Date: Tue, 17 May 2022 10:33:40 +0200 Subject: [PATCH] avoid NPE when initializing chat permission currentConversation could have been null when opening the ChatController from notification. hasChatPermission is now only set in getRoomInfo Signed-off-by: Marcel Hibbe --- .../main/java/com/nextcloud/talk/controllers/ChatController.kt | 3 --- 1 file changed, 3 deletions(-) diff --git a/app/src/main/java/com/nextcloud/talk/controllers/ChatController.kt b/app/src/main/java/com/nextcloud/talk/controllers/ChatController.kt index f781b9160..d62bf095e 100644 --- a/app/src/main/java/com/nextcloud/talk/controllers/ChatController.kt +++ b/app/src/main/java/com/nextcloud/talk/controllers/ChatController.kt @@ -312,9 +312,6 @@ class ChatController(args: Bundle) : } this.voiceOnly = args.getBoolean(BundleKeys.KEY_CALL_VOICE_ONLY, false) - - hasChatPermission = - AttendeePermissionsUtil(currentConversation!!.permissions).hasChatPermission(conversationUser) } private fun getRoomInfo() {