mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Fixed chat room lookup while in call
This commit is contained in:
parent
2d33f9489f
commit
1843bd4c1e
1 changed files with 6 additions and 5 deletions
|
|
@ -942,12 +942,10 @@ class CurrentCallViewModel
|
|||
fun createConversation() {
|
||||
if (::currentCall.isInitialized) {
|
||||
coreContext.postOnCoreThread {
|
||||
val existingConversation = lookupCurrentCallConversation(currentCall)
|
||||
val existingConversation = currentCallConversation ?: lookupCurrentCallConversation(currentCall)
|
||||
if (existingConversation != null) {
|
||||
Log.i(
|
||||
"$TAG Found existing conversation [${
|
||||
LinphoneUtils.getConversationId(existingConversation)
|
||||
}], going to it"
|
||||
"$TAG Found existing conversation [${LinphoneUtils.getConversationId(existingConversation)}], going to it"
|
||||
)
|
||||
goToConversationEvent.postValue(Event(LinphoneUtils.getConversationId(existingConversation)))
|
||||
} else {
|
||||
|
|
@ -1372,8 +1370,9 @@ class CurrentCallViewModel
|
|||
val localAddress = call.callLog.localAddress
|
||||
val remoteAddress = call.remoteAddress
|
||||
|
||||
val params: ConferenceParams? = null
|
||||
val existingConversation = if (call.conference != null) {
|
||||
Log.i("$TAG Looking for conversation with local address [${localAddress.asStringUriOnly()}] and peer address [${remoteAddress.asStringUriOnly()}]")
|
||||
val params: ConferenceParams? = null // Don't need specific params, remote address should be enough in that scenario
|
||||
call.core.searchChatRoom(
|
||||
params,
|
||||
localAddress,
|
||||
|
|
@ -1381,7 +1380,9 @@ class CurrentCallViewModel
|
|||
arrayOf()
|
||||
)
|
||||
} else {
|
||||
val params = getChatRoomParams(call)
|
||||
val participants = arrayOf(remoteAddress)
|
||||
Log.i("$TAG Looking for conversation with local address [${localAddress.asStringUriOnly()}] and participant [${remoteAddress.asStringUriOnly()}]")
|
||||
call.core.searchChatRoom(
|
||||
params,
|
||||
localAddress,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue