File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -22,8 +22,12 @@ public extension Room {
22
22
/// All agent participants in the Room
23
23
var agentParticipants : [ Participant . Identity : RemoteParticipant ] {
24
24
// Filter out agents that are replaced by another agent e.g. avatar worker
25
- let onBehalf = Set ( remoteParticipants. map ( \. value. attributes [ publishOnBehalfAttributeKey] ) . compactMap { $0 } )
26
- return remoteParticipants. filter { $0. value. isAgent && !onBehalf. contains ( $0. key. stringValue) }
25
+ let onBehalfIdentities = Set ( remoteParticipants. compactMap {
26
+ $0. value. attributes [ publishOnBehalfAttributeKey]
27
+ } )
28
+ return remoteParticipants. filter {
29
+ $0. value. isAgent && !onBehalfIdentities. contains ( $0. key. stringValue)
30
+ }
27
31
}
28
32
29
33
/// The first agent participant in the Room
You can’t perform that action at this time.
0 commit comments