Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
savoirfairelinux
jami-client-android
Commits
fe9e3293
Commit
fe9e3293
authored
Oct 13, 2021
by
Maxime Callet
Browse files
Conference: add host to participant list
Change-Id: Id59ee98c68d71c8b7cf850916576b01eb55fcb2f
parent
30dcd4cb
Changes
1
Hide whitespace changes
Inline
Side-by-side
ring-android/libjamiclient/src/main/kotlin/net/jami/services/CallService.kt
View file @
fe9e3293
...
...
@@ -95,40 +95,31 @@ class CallService(
var
isModerator
=
false
if
(
conference
!=
null
)
{
val
newInfo
:
MutableList
<
ParticipantInfo
>
=
ArrayList
(
info
.
size
)
if
(
conference
.
isConference
)
{
for
(
i
in
info
)
{
val
uri
=
i
[
"uri"
]
!!
if
(
uri
.
isEmpty
())
continue
val
call
=
conference
.
findCallByContact
(
Uri
.
fromString
(
i
[
"uri"
]
!!
))
val
account
=
mAccountService
.
getAccount
(
conference
.
firstCall
?.
account
)
?:
return
for
(
i
in
info
)
{
val
uri
=
i
[
"uri"
]
!!
val
confInfo
=
if
(
uri
.
isEmpty
())
{
ParticipantInfo
(
null
,
account
.
getContactFromCache
(
Uri
.
fromId
(
account
.
username
!!
)),
i
)
}
else
{
val
contactUri
=
Uri
.
fromString
(
uri
)
val
call
=
conference
.
findCallByContact
(
contactUri
)
if
(
call
!=
null
)
{
val
confInfo
=
ParticipantInfo
(
call
,
call
.
contact
!!
,
i
)
if
(
confInfo
.
isEmpty
)
{
Log
.
w
(
TAG
,
"onConferenceInfoUpdated: ignoring empty entry $i"
)
continue
}
if
(
confInfo
.
contact
.
isUser
&&
confInfo
.
isModerator
)
{
isModerator
=
true
}
newInfo
.
add
(
confInfo
)
ParticipantInfo
(
call
,
call
.
contact
!!
,
i
)
}
else
{
Log
.
w
(
TAG
,
"onConferenceInfoUpdated $confId can't find call for $i"
)
// TODO
ParticipantInfo
(
null
,
account
.
getContactFromCache
(
contactUri
),
i
)
}
}
}
else
{
val
account
=
mAccountService
.
getAccount
(
conference
.
call
!!
.
account
!!
)
!!
for
(
i
in
info
)
{
val
confInfo
=
ParticipantInfo
(
null
,
account
.
getContactFromCache
(
Uri
.
fromString
(
i
[
"uri"
]
!!
)),
i
)
if
(
confInfo
.
isEmpty
)
{
Log
.
w
(
TAG
,
"onConferenceInfoUpdated: ignoring empty entry $i"
)
continue
}
if
(
confInfo
.
contact
.
isUser
&&
confInfo
.
isModerator
)
{
isModerator
=
true
}
newInfo
.
add
(
confInfo
)
if
(
confInfo
.
isEmpty
)
{
Log
.
w
(
TAG
,
"onConferenceInfoUpdated: ignoring empty entry $i"
)
continue
}
if
(
confInfo
.
contact
.
isUser
&&
confInfo
.
isModerator
)
{
isModerator
=
true
}
newInfo
.
add
(
confInfo
)
}
conference
.
isModerator
=
isModerator
conference
.
setInfo
(
newInfo
)
}
else
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment