Skip to content

fix(fluid-static):Added userData in member connection details #24485

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions packages/framework/fluid-static/src/serviceAudience.ts
Original file line number Diff line number Diff line change
@@ -111,13 +111,13 @@ class ServiceAudience<TMember extends IMember = IMember>
const userId = member.user.id;
// Ensure we're tracking the user
let user = users.get(userId);
const connectionDetails = this.createServiceMember(member);
if (user === undefined) {
user = this.createServiceMember(member);
user = {...connectionDetails};
users.set(userId, user);
}

// Add this connection to their collection
user.connections.push({ id: clientId, mode: member.mode });
// Add this connection to their collection
user.connections.push({ id: clientId, mode: member.mode, userData :{...connectionDetails, connections: undefined}});
clientMemberMap.set(clientId, user);
}
}
2 changes: 2 additions & 0 deletions packages/framework/fluid-static/src/types.ts
Original file line number Diff line number Diff line change
@@ -209,6 +209,8 @@ export interface IConnection {
* Whether the connection is in read or read/write mode.
*/
readonly mode: "write" | "read";

readonly userData: IMember;
}

/**