Open
Conversation
nickbar01234
commented
Jan 1, 2026
| </div> | ||
| <h2 className="font-medium"> | ||
| Code<span className="text-codebuddy-pink">Buddy</span> | ||
| Code<span className="text-codebuddy-pink">Buddy2</span> |
nickbar01234
commented
Jan 1, 2026
| if (room && Object.keys(room.users).includes(username)) { | ||
| console.log(`User ${username} is already in room ${id}`); | ||
| set((state) => { | ||
| state.status = RoomStatus.IN_ROOM; |
Owner
Author
There was a problem hiding this comment.
Do we want to set state here?
nickbar01234
commented
Jan 1, 2026
| }); | ||
| } | ||
| }, | ||
| checkAlreadyInRoom: async (id: string) => { |
Owner
Author
There was a problem hiding this comment.
RoomController already does a fetch https://github.com/nickbar01234/codebuddy/blob/main/extension/src/services/controllers/RoomController.ts#L284-L305. Probably can just extend from it?
nickbar01234
commented
Jan 1, 2026
| const username = appStore | ||
| .getState() | ||
| .actions.getAuthUser().username; | ||
| const room = await db.room.get(id); |
Owner
Author
There was a problem hiding this comment.
You mentioned dialog never popped up. Did you print username / room object here?
nickbar01234
commented
Jan 1, 2026
| }, [join]); | ||
| }, [join, checkAlreadyInRoom]); | ||
|
|
||
| const onJoinAnyway = React.useMemo(() => { |
Owner
Author
There was a problem hiding this comment.
Update onJoinRoom to take a parameter on whether to validate if user is already in room or not
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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!
Possible Downsides
Additional Documentations