2020-04-16 11:26:44 +00:00
|
|
|
// @flow
|
|
|
|
|
2020-05-07 09:54:02 +00:00
|
|
|
import { TOGGLE_E2EE } from './actionTypes';
|
2020-04-16 11:26:44 +00:00
|
|
|
|
|
|
|
/**
|
2020-05-07 09:54:02 +00:00
|
|
|
* Dispatches an action to enable / disable E2EE.
|
2020-04-16 11:26:44 +00:00
|
|
|
*
|
2020-05-07 09:54:02 +00:00
|
|
|
* @param {boolean} enabled - Whether E2EE is to be enabled or not.
|
2020-04-16 11:26:44 +00:00
|
|
|
* @returns {Object}
|
|
|
|
*/
|
2020-05-07 09:54:02 +00:00
|
|
|
export function toggleE2EE(enabled: boolean) {
|
2020-04-16 11:26:44 +00:00
|
|
|
return {
|
2020-05-07 09:54:02 +00:00
|
|
|
type: TOGGLE_E2EE,
|
|
|
|
enabled
|
2020-04-16 11:26:44 +00:00
|
|
|
};
|
|
|
|
}
|