ref(notifications): move join notification firing to notifications feature

This commit is contained in:
Leonard Kim
2019-06-25 15:25:43 -07:00
committed by virtuacoplenny
parent 3195a449ca
commit 979b773c3c
4 changed files with 110 additions and 86 deletions

View File

@@ -20,8 +20,7 @@ import {
localParticipantJoined,
localParticipantLeft,
participantLeft,
participantUpdated,
showParticipantJoinedNotification
participantUpdated
} from './actions';
import {
DOMINANT_SPEAKER_CHANGED,
@@ -118,15 +117,7 @@ MiddlewareRegistry.register(store => next => action => {
case PARTICIPANT_JOINED: {
_maybePlaySounds(store, action);
const result = _participantJoinedOrUpdated(store, next, action);
const { participant: p } = action;
if (!p.local) {
store.dispatch(showParticipantJoinedNotification(getParticipantDisplayName(store.getState, p.id)));
}
return result;
return _participantJoinedOrUpdated(store, next, action);
}
case PARTICIPANT_LEFT: