Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-client-android
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-client-android
Commits
09d49bcf
Commit
09d49bcf
authored
Sep 30, 2021
by
Adrien Béraud
Browse files
Options
Downloads
Patches
Plain Diff
conversation facade: handle call from unknown swarm
Change-Id: I5f3329fa41aab4a938fdb4227ce3a1892adcffc9
parent
bb32dd3a
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
ring-android/libjamiclient/src/main/kotlin/net/jami/services/ConversationFacade.kt
+10
-8
10 additions, 8 deletions
...t/src/main/kotlin/net/jami/services/ConversationFacade.kt
with
10 additions
and
8 deletions
ring-android/libjamiclient/src/main/kotlin/net/jami/services/ConversationFacade.kt
+
10
−
8
View file @
09d49bcf
...
@@ -21,6 +21,7 @@
...
@@ -21,6 +21,7 @@
package
net.jami.services
package
net.jami.services
import
io.reactivex.rxjava3.core.Completable
import
io.reactivex.rxjava3.core.Completable
import
io.reactivex.rxjava3.core.Maybe
import
io.reactivex.rxjava3.core.Observable
import
io.reactivex.rxjava3.core.Observable
import
io.reactivex.rxjava3.core.Single
import
io.reactivex.rxjava3.core.Single
import
io.reactivex.rxjava3.disposables.CompositeDisposable
import
io.reactivex.rxjava3.disposables.CompositeDisposable
...
@@ -497,9 +498,9 @@ class ConversationFacade(
...
@@ -497,9 +498,9 @@ class ConversationFacade(
if
(
contact
==
null
)
if
(
contact
==
null
)
null
null
else
else
account
.
getByUri
(
contact
.
conversationUri
.
blockingFirst
())
account
.
getByUri
(
contact
.
conversationUri
.
blockingFirst
())
?:
account
.
getByUri
(
contact
.
uri
)
else
else
account
.
get
Swarm
(
conversationId
)
account
.
get
ByUri
(
Uri
(
Uri
.
SWARM_SCHEME
,
conversationId
)
)
val
conference
=
if
(
conversation
!=
null
)
(
conversation
.
getConference
(
call
.
daemonIdString
)
?:
Conference
(
call
).
apply
{
val
conference
=
if
(
conversation
!=
null
)
(
conversation
.
getConference
(
call
.
daemonIdString
)
?:
Conference
(
call
).
apply
{
if
(
newState
===
CallStatus
.
OVER
)
return
@onCallStateChange
if
(
newState
===
CallStatus
.
OVER
)
return
@onCallStateChange
conversation
.
addConference
(
this
)
conversation
.
addConference
(
this
)
...
@@ -658,13 +659,14 @@ class ConversationFacade(
...
@@ -658,13 +659,14 @@ class ConversationFacade(
}.
subscribe
())
})
}.
subscribe
())
})
mDisposableBag
.
add
(
mAccountService
mDisposableBag
.
add
(
mAccountService
.
messageStateChanges
.
messageStateChanges
.
concatMap
Singl
e
{
e
:
Interaction
->
.
concatMap
Mayb
e
{
e
:
Interaction
->
getAccountSubject
(
e
.
account
!!
)
getAccountSubject
(
e
.
account
!!
)
.
map
{
a
:
Account
->
.
flatMapMaybe
<
Conversation
>
{
a
:
Account
->
Maybe
.
fromCallable
{
if
(
e
.
conversation
==
null
)
if
(
e
.
conversation
==
null
)
a
.
getByUri
(
Uri
(
Uri
.
SWARM_SCHEME
,
e
.
conversationId
!!
))
!!
a
.
getByUri
(
Uri
(
Uri
.
SWARM_SCHEME
,
e
.
conversationId
!!
))
else
else
a
.
getByUri
(
e
.
conversation
!!
.
participant
)
!!
a
.
getByUri
(
e
.
conversation
!!
.
participant
)
}
}
}
.
doOnSuccess
{
conversation
->
conversation
.
updateInteraction
(
e
)
}
.
doOnSuccess
{
conversation
->
conversation
.
updateInteraction
(
e
)
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment