|
@@ -336,7 +336,7 @@ class ChatController(args: Bundle) :
|
|
@Suppress("Detekt.TooGenericExceptionCaught")
|
|
@Suppress("Detekt.TooGenericExceptionCaught")
|
|
override fun onNext(roomOverall: RoomOverall) {
|
|
override fun onNext(roomOverall: RoomOverall) {
|
|
Log.d(TAG, "getRoomInfo - getRoom - got response: " + startNanoTime)
|
|
Log.d(TAG, "getRoomInfo - getRoom - got response: " + startNanoTime)
|
|
- currentConversation = roomOverall.ocs.data
|
|
|
|
|
|
+ currentConversation = roomOverall.ocs!!.data
|
|
Log.d(
|
|
Log.d(
|
|
TAG,
|
|
TAG,
|
|
"getRoomInfo. token: " + currentConversation?.token +
|
|
"getRoomInfo. token: " + currentConversation?.token +
|
|
@@ -401,7 +401,7 @@ class ChatController(args: Bundle) :
|
|
|
|
|
|
override fun onNext(roomsOverall: RoomsOverall) {
|
|
override fun onNext(roomsOverall: RoomsOverall) {
|
|
Log.d(TAG, "handleFromNotification - getRooms - got response")
|
|
Log.d(TAG, "handleFromNotification - getRooms - got response")
|
|
- for (conversation in roomsOverall.ocs.data) {
|
|
|
|
|
|
+ for (conversation in roomsOverall.ocs!!.data!!) {
|
|
if (roomId == conversation.roomId) {
|
|
if (roomId == conversation.roomId) {
|
|
roomToken = conversation.token
|
|
roomToken = conversation.token
|
|
currentConversation = conversation
|
|
currentConversation = conversation
|
|
@@ -1792,7 +1792,7 @@ class ChatController(args: Bundle) :
|
|
override fun onNext(roomOverall: RoomOverall) {
|
|
override fun onNext(roomOverall: RoomOverall) {
|
|
Log.d(TAG, "joinRoomWithPassword - joinRoom - got response: " + startNanoTime)
|
|
Log.d(TAG, "joinRoomWithPassword - joinRoom - got response: " + startNanoTime)
|
|
inConversation = true
|
|
inConversation = true
|
|
- currentConversation?.sessionId = roomOverall.ocs.data.sessionId
|
|
|
|
|
|
+ currentConversation?.sessionId = roomOverall.ocs!!.data!!.sessionId
|
|
Log.d(TAG, "joinRoomWithPassword - sessionId: " + currentConversation?.sessionId)
|
|
Log.d(TAG, "joinRoomWithPassword - sessionId: " + currentConversation?.sessionId)
|
|
|
|
|
|
ApplicationWideCurrentRoomHolder.getInstance().session =
|
|
ApplicationWideCurrentRoomHolder.getInstance().session =
|
|
@@ -2653,15 +2653,15 @@ class ChatController(args: Bundle) :
|
|
override fun onNext(roomOverall: RoomOverall) {
|
|
override fun onNext(roomOverall: RoomOverall) {
|
|
val bundle = Bundle()
|
|
val bundle = Bundle()
|
|
bundle.putParcelable(KEY_USER_ENTITY, conversationUser)
|
|
bundle.putParcelable(KEY_USER_ENTITY, conversationUser)
|
|
- bundle.putString(KEY_ROOM_TOKEN, roomOverall.getOcs().getData().token)
|
|
|
|
- bundle.putString(KEY_ROOM_ID, roomOverall.getOcs().getData().roomId)
|
|
|
|
|
|
+ bundle.putString(KEY_ROOM_TOKEN, roomOverall.ocs!!.data!!.token)
|
|
|
|
+ bundle.putString(KEY_ROOM_ID, roomOverall.ocs!!.data!!.roomId)
|
|
|
|
|
|
// FIXME once APIv2+ is used only, the createRoom already returns all the data
|
|
// FIXME once APIv2+ is used only, the createRoom already returns all the data
|
|
ncApi!!.getRoom(
|
|
ncApi!!.getRoom(
|
|
credentials,
|
|
credentials,
|
|
ApiUtils.getUrlForRoom(
|
|
ApiUtils.getUrlForRoom(
|
|
apiVersion, conversationUser?.baseUrl,
|
|
apiVersion, conversationUser?.baseUrl,
|
|
- roomOverall.getOcs().getData().token
|
|
|
|
|
|
+ roomOverall.ocs!!.data!!.token
|
|
)
|
|
)
|
|
)
|
|
)
|
|
.subscribeOn(Schedulers.io())
|
|
.subscribeOn(Schedulers.io())
|
|
@@ -2674,11 +2674,11 @@ class ChatController(args: Bundle) :
|
|
override fun onNext(roomOverall: RoomOverall) {
|
|
override fun onNext(roomOverall: RoomOverall) {
|
|
bundle.putParcelable(
|
|
bundle.putParcelable(
|
|
KEY_ACTIVE_CONVERSATION,
|
|
KEY_ACTIVE_CONVERSATION,
|
|
- Parcels.wrap(roomOverall.getOcs().getData())
|
|
|
|
|
|
+ Parcels.wrap(roomOverall.ocs!!.data!!)
|
|
)
|
|
)
|
|
remapChatController(
|
|
remapChatController(
|
|
router, conversationUser!!.id,
|
|
router, conversationUser!!.id,
|
|
- roomOverall.getOcs().getData().token!!, bundle, true
|
|
|
|
|
|
+ roomOverall.ocs!!.data!!.token!!, bundle, true
|
|
)
|
|
)
|
|
}
|
|
}
|
|
|
|
|
|
@@ -2968,19 +2968,19 @@ class ChatController(args: Bundle) :
|
|
val conversationIntent = Intent(activity, CallActivity::class.java)
|
|
val conversationIntent = Intent(activity, CallActivity::class.java)
|
|
val bundle = Bundle()
|
|
val bundle = Bundle()
|
|
bundle.putParcelable(KEY_USER_ENTITY, conversationUser)
|
|
bundle.putParcelable(KEY_USER_ENTITY, conversationUser)
|
|
- bundle.putString(KEY_ROOM_TOKEN, roomOverall.ocs.data.token)
|
|
|
|
- bundle.putString(KEY_ROOM_ID, roomOverall.ocs.data.roomId)
|
|
|
|
|
|
+ bundle.putString(KEY_ROOM_TOKEN, roomOverall.ocs!!.data!!.token)
|
|
|
|
+ bundle.putString(KEY_ROOM_ID, roomOverall.ocs!!.data!!.roomId)
|
|
|
|
|
|
if (conversationUser != null) {
|
|
if (conversationUser != null) {
|
|
bundle.putParcelable(
|
|
bundle.putParcelable(
|
|
KEY_ACTIVE_CONVERSATION,
|
|
KEY_ACTIVE_CONVERSATION,
|
|
- Parcels.wrap(roomOverall.ocs.data)
|
|
|
|
|
|
+ Parcels.wrap(roomOverall.ocs!!.data)
|
|
)
|
|
)
|
|
conversationIntent.putExtras(bundle)
|
|
conversationIntent.putExtras(bundle)
|
|
|
|
|
|
ConductorRemapping.remapChatController(
|
|
ConductorRemapping.remapChatController(
|
|
router, conversationUser.id,
|
|
router, conversationUser.id,
|
|
- roomOverall.ocs.data.token!!, bundle, false
|
|
|
|
|
|
+ roomOverall.ocs!!.data!!.token!!, bundle, false
|
|
)
|
|
)
|
|
} else {
|
|
} else {
|
|
conversationIntent.putExtras(bundle)
|
|
conversationIntent.putExtras(bundle)
|