File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -19,19 +19,19 @@ import Foundation
19
19
let publishOnBehalfAttributeKey = " lk.publish_on_behalf "
20
20
21
21
public extension Room {
22
- /// All agent participants in the Room
22
+ /// Returns a dictionary containing all agent participants.
23
23
@objc
24
- var agentParticipants : [ Participant . Identity : RemoteParticipant ] {
24
+ var agentParticipants : [ Participant . Identity : Participant ] {
25
25
// Filter out agents that are replaced by another agent e.g. avatar worker
26
- let onBehalfIdentities = Set ( remoteParticipants . compactMap {
26
+ let onBehalfIdentities = Set ( allParticipants . compactMap {
27
27
$0. value. attributes [ publishOnBehalfAttributeKey]
28
28
} )
29
- return remoteParticipants . filter {
29
+ return allParticipants . filter {
30
30
$0. value. isAgent && !onBehalfIdentities. contains ( $0. key. stringValue)
31
31
}
32
32
}
33
33
34
- /// The first agent participant in the Room
34
+ /// Returns the first agent participant or `nil` if there are no agent participants.
35
35
@objc
36
36
var agentParticipant : Participant ? {
37
37
agentParticipants. values. first
You can’t perform that action at this time.
0 commit comments