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 59225b3d5..f279631aa 100644 --- a/app/src/main/java/com/nextcloud/talk/controllers/ChatController.kt +++ b/app/src/main/java/com/nextcloud/talk/controllers/ChatController.kt @@ -2151,13 +2151,11 @@ class ChatController(args: Bundle) : return } - webSocketInstance = - if (WebSocketConnectionHelper.getMagicWebSocketInstanceForUserId(conversationUser.id!!) != null) { - WebSocketConnectionHelper.getMagicWebSocketInstanceForUserId(conversationUser.id!!) - } else { - Log.d(TAG, "magicWebSocketInstance became null") - null - } + webSocketInstance = WebSocketConnectionHelper.getMagicWebSocketInstanceForUserId(conversationUser.id!!) + + if (webSocketInstance == null) { + Log.d(TAG, "magicWebSocketInstance became null") + } } fun pullChatMessages(lookIntoFuture: Int, setReadMarker: Int = 1, xChatLastCommonRead: Int? = null) {