From 42b85f73bdf888eb4244dff030ade24f1b8de826 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Thu, 21 Jun 2018 15:43:51 +0200 Subject: [PATCH] [iOS] Fix checking if a track is local in ithe CallKit middleware Not all TRACK_ actions include the `local` attribute, so use the underlying `jitsiTrack` to check it. --- react/features/mobile/callkit/middleware.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/react/features/mobile/callkit/middleware.js b/react/features/mobile/callkit/middleware.js index f41daa278..7362fb861 100644 --- a/react/features/mobile/callkit/middleware.js +++ b/react/features/mobile/callkit/middleware.js @@ -380,11 +380,11 @@ function _setCallKitSubscriptions({ getState }, next, action) { */ function _syncTrackState({ getState }, next, action) { const result = next(action); - const { track } = action; + const { jitsiTrack } = action.track; const state = getState(); const conference = getCurrentConference(state); - if (track.local && conference && conference.callUUID) { + if (jitsiTrack.isLocal() && conference && conference.callUUID) { const tracks = state['features/base/tracks']; const muted = isLocalTrackMuted(tracks, MEDIA_TYPE.AUDIO);