mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-04-20 09:58:28 +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() {
|
fun createConversation() {
|
||||||
if (::currentCall.isInitialized) {
|
if (::currentCall.isInitialized) {
|
||||||
coreContext.postOnCoreThread {
|
coreContext.postOnCoreThread {
|
||||||
val existingConversation = lookupCurrentCallConversation(currentCall)
|
val existingConversation = currentCallConversation ?: lookupCurrentCallConversation(currentCall)
|
||||||
if (existingConversation != null) {
|
if (existingConversation != null) {
|
||||||
Log.i(
|
Log.i(
|
||||||
"$TAG Found existing conversation [${
|
"$TAG Found existing conversation [${LinphoneUtils.getConversationId(existingConversation)}], going to it"
|
||||||
LinphoneUtils.getConversationId(existingConversation)
|
|
||||||
}], going to it"
|
|
||||||
)
|
)
|
||||||
goToConversationEvent.postValue(Event(LinphoneUtils.getConversationId(existingConversation)))
|
goToConversationEvent.postValue(Event(LinphoneUtils.getConversationId(existingConversation)))
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -1372,8 +1370,9 @@ class CurrentCallViewModel
|
||||||
val localAddress = call.callLog.localAddress
|
val localAddress = call.callLog.localAddress
|
||||||
val remoteAddress = call.remoteAddress
|
val remoteAddress = call.remoteAddress
|
||||||
|
|
||||||
val params: ConferenceParams? = null
|
|
||||||
val existingConversation = if (call.conference != 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(
|
call.core.searchChatRoom(
|
||||||
params,
|
params,
|
||||||
localAddress,
|
localAddress,
|
||||||
|
|
@ -1381,7 +1380,9 @@ class CurrentCallViewModel
|
||||||
arrayOf()
|
arrayOf()
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
|
val params = getChatRoomParams(call)
|
||||||
val participants = arrayOf(remoteAddress)
|
val participants = arrayOf(remoteAddress)
|
||||||
|
Log.i("$TAG Looking for conversation with local address [${localAddress.asStringUriOnly()}] and participant [${remoteAddress.asStringUriOnly()}]")
|
||||||
call.core.searchChatRoom(
|
call.core.searchChatRoom(
|
||||||
params,
|
params,
|
||||||
localAddress,
|
localAddress,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue