mirror of
https://github.com/vector-im/element-call.git
synced 2026-02-11 04:27:03 +00:00
quick refactor, use object instead of tupple
This commit is contained in:
@@ -221,14 +221,14 @@ export class ConnectionManager {
|
||||
this.scope.behavior(
|
||||
this.connections$.pipe(
|
||||
switchMap((connections) => {
|
||||
// Map the connections to list of (connection, participant[])[] tuples
|
||||
// Map the connections to list of {connection, participants}[]
|
||||
const listOfConnectionsWithPublishingParticipants = connections.map(
|
||||
(connection) => {
|
||||
return connection.participantsWithTrack$.pipe(
|
||||
map((participants): [Connection, LivekitParticipant[]] => [
|
||||
map((participants) => ({
|
||||
connection,
|
||||
participants,
|
||||
]),
|
||||
})),
|
||||
);
|
||||
},
|
||||
);
|
||||
@@ -237,7 +237,7 @@ export class ConnectionManager {
|
||||
listOfConnectionsWithPublishingParticipants,
|
||||
).pipe(
|
||||
map((lists) =>
|
||||
lists.reduce((data, [connection, participants]) => {
|
||||
lists.reduce((data, { connection, participants }) => {
|
||||
data.add(connection, participants);
|
||||
return data;
|
||||
}, new ConnectionManagerData()),
|
||||
|
||||
Reference in New Issue
Block a user