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>
This commit is contained in:
Marcel Hibbe 2022-05-17 10:33:40 +02:00 committed by Marcel Hibbe (Rebase PR Action)
parent fd9637891c
commit 7ae5413308

View file

@ -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() {