Add a feature flag for private group chats

pull/599/head
Maxim Shishmarev 6 years ago
parent 49976a4f81
commit f4ed8b2bf3

@ -462,3 +462,7 @@ window.pubkeyPattern = /@[a-fA-F0-9]{64,66}\b/g;
// Limited due to the proof-of-work requirement // Limited due to the proof-of-work requirement
window.SMALL_GROUP_SIZE_LIMIT = 10; window.SMALL_GROUP_SIZE_LIMIT = 10;
window.lokiFeatureFlags = {
privateGroupChats: true,
};

@ -17,6 +17,12 @@ import { clipboard } from 'electron';
import { validateNumber } from '../types/PhoneNumber'; import { validateNumber } from '../types/PhoneNumber';
declare global {
interface Window {
lokiFeatureFlags: any;
}
}
interface MenuItem { interface MenuItem {
id: string; id: string;
name: string; name: string;
@ -341,14 +347,17 @@ export class MainHeader extends React.Component<Props, any> {
trigger('showAddServerDialog'); trigger('showAddServerDialog');
}, },
}, },
{ ];
if (window.lokiFeatureFlags.privateGroupChats) {
menuItems.push({
id: 'createPrivateGroup', id: 'createPrivateGroup',
name: i18n('createPrivateGroup'), name: i18n('createPrivateGroup'),
onClick: () => { onClick: () => {
trigger('createNewGroup'); trigger('createNewGroup');
}, },
}, });
]; }
const passItem = (type: string) => ({ const passItem = (type: string) => ({
id: `${type}Password`, id: `${type}Password`,

Loading…
Cancel
Save