mirror of https://github.com/jitsi/jitsi-meet
Add ability to invite users which will use the share sheet or dialog dynamically.pull/5371/head jitsi-meet_4314
parent
a7f8bf2d8f
commit
cdc14586de
@ -0,0 +1,31 @@ |
||||
// @flow
|
||||
|
||||
import type { Dispatch } from 'redux'; |
||||
|
||||
import { getFeatureFlag, INVITE_ENABLED } from '../base/flags'; |
||||
import { beginShareRoom } from '../share-room'; |
||||
|
||||
import { setAddPeopleDialogVisible } from './actions.any'; |
||||
import { isAddPeopleEnabled, isDialOutEnabled } from './functions'; |
||||
|
||||
export * from './actions.any'; |
||||
|
||||
/** |
||||
* Starts the process for inviting people. Dpending on the sysstem config it |
||||
* may use the system share sheet or the invite peoplee dialog. |
||||
* |
||||
* @returns {Function} |
||||
*/ |
||||
export function doInvitePeople() { |
||||
return (dispatch: Dispatch<any>, getState: Function) => { |
||||
const state = getState(); |
||||
const addPeopleEnabled = getFeatureFlag(state, INVITE_ENABLED, true) |
||||
&& (isAddPeopleEnabled(state) || isDialOutEnabled(state)); |
||||
|
||||
if (addPeopleEnabled) { |
||||
return dispatch(setAddPeopleDialogVisible(true)); |
||||
} |
||||
|
||||
return dispatch(beginShareRoom()); |
||||
}; |
||||
} |
@ -0,0 +1 @@ |
||||
export * from './actions.any'; |
Loading…
Reference in new issue