Voice Room Membership Error #106
Reference in New Issue
Block a user
Delete Branch "bugfix/voice-room-membership-error"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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."
@@ -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.messagepushToast({theme: "error", message})}I think this should probably go in the component as it was before. Otherwise, LGTM
It's not as simple as moving it back to the component here because by calling
handleJoinError()fromjoinVoice()I stealth-fixed another bug which was that we weren't doing the full error handling flow onrejoinVoiceRoom().rejoinVoiceRoom()is called fromVoiceWidgetandjoinVoiceRoom()is called fromVoiceRoomItem, so the helperhandleJoinError()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?
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.