Skip to content

Commit

Permalink
fix(#141): make file transfers work again
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyckahn committed Dec 5, 2024
1 parent 8c86140 commit 60be4fb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/components/Room/useRoomFileShare.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ export function useRoomFileShare({
setSharedFiles(files)
setIsFileSharingEnabled(false)

if (typeof shellContext.roomId !== 'string') {
throw new Error('shellContext.roomId is not a string')
if (!shellContext.roomId) {
throw new Error('shellContext.roomId is not a non-empty string')
}

const alertText =
Expand Down
1 change: 1 addition & 0 deletions src/components/Shell/PeerList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ export const PeerList = ({
peer={peer}
peerConnectionTypes={peerConnectionTypes}
peerAudioChannels={peerAudioChannels}
roomId={roomId ?? ''}
/>
))}
{peerList.length === 0 &&
Expand Down
4 changes: 3 additions & 1 deletion src/components/Shell/PeerListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ interface PeerListItemProps {
peer: Peer
peerConnectionTypes: Record<string, PeerConnectionType>
peerAudioChannels: Record<string, AudioChannel>
roomId: string
}

const verificationStateDisplayMap = {
Expand All @@ -65,6 +66,7 @@ export const PeerListItem = ({
peer,
peerConnectionTypes,
peerAudioChannels,
roomId,
}: PeerListItemProps) => {
const theme = useTheme()
const { getUserSettings } = useContext(SettingsContext)
Expand Down Expand Up @@ -194,7 +196,7 @@ export const PeerListItem = ({
mt={1}
overflow="auto"
>
<Room roomId="" userId={userId} targetPeerId={peer.peerId} />
<Room roomId={roomId} userId={userId} targetPeerId={peer.peerId} />
</Box>
</DialogContent>
<DialogActions>
Expand Down

0 comments on commit 60be4fb

Please sign in to comment.