Voice Room Membership Error #106

Merged
hodlbod merged 2 commits from bugfix/voice-room-membership-error into dev 2026-03-27 17:45:42 +00:00
Collaborator

Before this we were showing "Failed to join voice room" if the relay rejected our request for a livekit token because we aren't a member of the room. Now it shows the error "Failed to join voice room: you must be a member."

Before this we were showing "Failed to join voice room" if the relay rejected our request for a livekit token because we aren't a member of the room. Now it shows the error "Failed to join voice room: you must be a member."
mplorentz added 1 commit 2026-03-25 20:30:40 +00:00
hodlbod added the priority label 2026-03-25 21:39:07 +00:00
hodlbod reviewed 2026-03-25 21:40:49 +00:00
src/app/voice.ts Outdated
@@ -20,0 +33,4 @@
message = "Connection timed out. Please check your network and try again."
else if (e instanceof Error && e.message === "No signer available") message = e.message
pushToast({theme: "error", message})
}
Owner

I think this should probably go in the component as it was before. Otherwise, LGTM

I think this should probably go in the component as it was before. Otherwise, LGTM
Author
Collaborator

It's not as simple as moving it back to the component here because by calling handleJoinError() from joinVoice() I stealth-fixed another bug which was that we weren't doing the full error handling flow on rejoinVoiceRoom(). rejoinVoiceRoom() is called from VoiceWidget and joinVoiceRoom() is called from VoiceRoomItem, so the helper handleJoinError() needs to be available in both. If I move its definition into to one of those components then it needs to be imported in the other one which doesn't seem right.

Are you cool with importing helpers from one component to another? Or should I create a new util class for this function? Or leave in in voice.ts? Or something else?

It's not as simple as moving it back to the component here because by calling `handleJoinError()` from `joinVoice()` I stealth-fixed another bug which was that we weren't doing the full error handling flow on `rejoinVoiceRoom()`. `rejoinVoiceRoom()` is called from `VoiceWidget` and `joinVoiceRoom()` is called from `VoiceRoomItem`, so the helper `handleJoinError()` needs to be available in both. If I move its definition into to one of those components then it needs to be imported in the other one which doesn't seem right. Are you cool with importing helpers from one component to another? Or should I create a new util class for this function? Or leave in in voice.ts? Or something else?
Owner

Yeah, occasionally I do export component helpers. As long as there's some kind of a dependency on the other component I think it's ok. The thing I want to avoid is mixing application logic and presentation layers.

Yeah, occasionally I do export component helpers. As long as there's some kind of a dependency on the other component I think it's ok. The thing I want to avoid is mixing application logic and presentation layers.
hodlbod removed the priority label 2026-03-25 21:41:01 +00:00
mplorentz added 1 commit 2026-03-27 17:25:08 +00:00
mplorentz requested review from hodlbod 2026-03-27 17:25:55 +00:00
hodlbod merged commit 82245d895c into dev 2026-03-27 17:45:42 +00:00
hodlbod deleted branch bugfix/voice-room-membership-error 2026-03-27 17:45:42 +00:00
Sign in to join this conversation.