Skip to content

Commit

Permalink
fix(local-recording) handle repeated values
Browse files Browse the repository at this point in the history
  • Loading branch information
saghul committed Nov 14, 2024
1 parent def9555 commit ee470f2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions react/features/base/participants/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ StateListenerRegistry.register(
features: { 'screen-sharing': true }
})),
'localRecording': (participant: IJitsiParticipant, value: string) =>
_localRecordingUpdated(store, conference, participant.getId(), value),
_localRecordingUpdated(store, conference, participant.getId(), Boolean(value)),
'raisedHand': (participant: IJitsiParticipant, value: string) =>
_raiseHandUpdated(store, conference, participant.getId(), value),
'region': (participant: IJitsiParticipant, value: string) =>
Expand Down Expand Up @@ -714,8 +714,13 @@ function _participantJoinedOrUpdated(store: IStore, next: Function, action: AnyA
* @returns {void}
*/
function _localRecordingUpdated({ dispatch, getState }: IStore, conference: IJitsiConference,
participantId: string, newValue: string) {
participantId: string, newValue: boolean) {
const state = getState();
const participant = getParticipantById(state, participantId);

if (participant?.localRecording === newValue) {
return;
}

dispatch(participantUpdated({
conference,
Expand Down
2 changes: 1 addition & 1 deletion react/features/base/participants/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export interface IParticipant {
loadableAvatarUrl?: string;
loadableAvatarUrlUseCORS?: boolean;
local?: boolean;
localRecording?: string;
localRecording?: boolean;
name?: string;
pinned?: boolean;
presence?: string;
Expand Down

0 comments on commit ee470f2

Please sign in to comment.