feat: bump socket.io-client & collab tweaks (#7444)

This commit is contained in:
David Luzar 2023-12-16 00:23:59 +01:00 committed by GitHub
parent 2c0929e537
commit 20e3acf7a6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 89 additions and 179 deletions

View file

@ -8,7 +8,10 @@ export const actionGoToCollaborator = register({
viewMode: true,
trackEvent: { category: "collab" },
perform: (_elements, appState, collaborator: Collaborator) => {
if (appState.userToFollow?.socketId === collaborator.socketId) {
if (
appState.userToFollow?.socketId === collaborator.socketId ||
collaborator.isCurrentUser
) {
return {
appState: {
...appState,
@ -51,6 +54,7 @@ export const actionGoToCollaborator = register({
name={collaborator.username || ""}
src={collaborator.avatarUrl}
isBeingFollowed={appState.userToFollow?.socketId === clientId}
isCurrentUser={collaborator.isCurrentUser === true}
/>
{collaborator.username}
</div>
@ -63,6 +67,7 @@ export const actionGoToCollaborator = register({
name={collaborator.username || ""}
src={collaborator.avatarUrl}
isBeingFollowed={appState.userToFollow?.socketId === clientId}
isCurrentUser={collaborator.isCurrentUser === true}
/>
);
},