Browse Source

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 <dev@mhibbe.de>
Marcel Hibbe 3 years ago
parent
commit
7ae5413308

+ 0 - 3
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)
         this.voiceOnly = args.getBoolean(BundleKeys.KEY_CALL_VOICE_ONLY, false)
-
-        hasChatPermission =
-            AttendeePermissionsUtil(currentConversation!!.permissions).hasChatPermission(conversationUser)
     }
     }
 
 
     private fun getRoomInfo() {
     private fun getRoomInfo() {