Skip to content

Commit bef19c3

Browse files
committed
feat: synchronize session participants on control grant and revoke actions
1 parent d703bb7 commit bef19c3

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

apps/desktop/src/renderer/components/capture/CapturePreview.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -540,11 +540,14 @@ export function CapturePreview({
540540
participantId,
541541
});
542542
}
543+
544+
// Sync session participants so host-side input injection sees the granted state immediately.
545+
await refreshSession();
543546
} catch (err) {
544547
console.error('Error granting control:', err);
545548
}
546549
},
547-
[session, getAuthHeaders, resolveViewerTargetId, grantControl]
550+
[session, getAuthHeaders, resolveViewerTargetId, grantControl, refreshSession]
548551
);
549552

550553
const handleRevokeControl = useCallback(
@@ -572,11 +575,14 @@ export function CapturePreview({
572575
participantId,
573576
});
574577
}
578+
579+
// Sync session participants so host-side input injection disables immediately.
580+
await refreshSession();
575581
} catch (err) {
576582
console.error('Error revoking control:', err);
577583
}
578584
},
579-
[session, getAuthHeaders, resolveViewerTargetId, revokeControl]
585+
[session, getAuthHeaders, resolveViewerTargetId, revokeControl, refreshSession]
580586
);
581587

582588
const handleKickParticipant = useCallback(

0 commit comments

Comments
 (0)