Skip to content

Conversation

@nickbar01234
Copy link
Owner

Description

Screenshots

Test

Checklist

If you're making changes to the extension, please run through the following checklist to make sure that we don't have
any regressions. Note that we plan to add integration tests in the future!

  • Create room and join room on at least 2 browsers
  • Ensure that code and tests are correctly stream
  • Verify that when reloading, user can automatically join the room

Possible Downsides

Additional Documentations

</div>
<h2 className="font-medium">
Code<span className="text-codebuddy-pink">Buddy</span>
Code<span className="text-codebuddy-pink">Buddy2</span>
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note to revert

if (room && Object.keys(room.users).includes(username)) {
console.log(`User ${username} is already in room ${id}`);
set((state) => {
state.status = RoomStatus.IN_ROOM;
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to set state here?

});
}
},
checkAlreadyInRoom: async (id: string) => {
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const username = appStore
.getState()
.actions.getAuthUser().username;
const room = await db.room.get(id);
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mentioned dialog never popped up. Did you print username / room object here?

}, [join]);
}, [join, checkAlreadyInRoom]);

const onJoinAnyway = React.useMemo(() => {
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update onJoinRoom to take a parameter on whether to validate if user is already in room or not

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants