jitsi-meet/react/features/conference/actions.native.js
Дамян Минков 6eb66b639e
Notify for kick and mute (#4328)
* Updates kick showing who kicked us.

* Notify participants that someone was kicked.

* Shows notification to user who is remotely muted.

* Updates the notification type.

* Muted by notification for mobile.

* Moves code to react and adds the kick notifications to mobile.

* Updates lib-jitsi-meet.
2019-06-17 16:00:09 +02:00

32 lines
929 B
JavaScript

// @flow
import type { Dispatch } from 'redux';
import {
AlertDialog,
openDialog
} from '../base/dialog';
import { getParticipantDisplayName } from '../base/participants';
/**
* Notify that we've been kicked out of the conference.
*
* @param {JitsiParticipant} participant - The {@link JitsiParticipant}
* instance which initiated the kick event.
* @param {?Function} submit - The function to execute after submiting the dialog.
* @returns {Function}
*/
export function notifyKickedOut(participant: Object, submit: ?Function) {
return (dispatch: Dispatch<any>, getState: Function) => {
dispatch(openDialog(AlertDialog, {
contentKey: {
key: 'dialog.kickTitle',
params: {
participantDisplayName: getParticipantDisplayName(getState, participant.getId())
}
},
onSubmit: submit
}));
};
}