fix: mixing clientId & socketId in UserList (#7461)

This commit is contained in:
David Luzar 2023-12-18 18:21:57 +01:00 committed by GitHub
parent 0808532b49
commit 57ea4e61d1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 46 additions and 39 deletions

View file

@ -12,6 +12,7 @@ export const actionGoToCollaborator = register({
trackEvent: { category: "collab" },
perform: (_elements, appState, collaborator: Collaborator) => {
if (
!collaborator.socketId ||
appState.userToFollow?.socketId === collaborator.socketId ||
collaborator.isCurrentUser
) {
@ -28,7 +29,7 @@ export const actionGoToCollaborator = register({
appState: {
...appState,
userToFollow: {
socketId: collaborator.socketId!,
socketId: collaborator.socketId,
username: collaborator.username || "",
},
// Close mobile menu