Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a feature flag for private group chats #599

Merged
merged 1 commit into from Nov 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions preload.js
Expand Up @@ -462,3 +462,7 @@ window.pubkeyPattern = /@[a-fA-F0-9]{64,66}\b/g;

// Limited due to the proof-of-work requirement
window.SMALL_GROUP_SIZE_LIMIT = 10;

window.lokiFeatureFlags = {
privateGroupChats: true,
};
15 changes: 12 additions & 3 deletions ts/components/MainHeader.tsx
Expand Up @@ -17,6 +17,12 @@ import { clipboard } from 'electron';

import { validateNumber } from '../types/PhoneNumber';

declare global {
interface Window {
lokiFeatureFlags: any;
}
}

interface MenuItem {
id: string;
name: string;
Expand Down Expand Up @@ -341,14 +347,17 @@ export class MainHeader extends React.Component<Props, any> {
trigger('showAddServerDialog');
},
},
{
];

if (window.lokiFeatureFlags.privateGroupChats) {
menuItems.push({
id: 'createPrivateGroup',
name: i18n('createPrivateGroup'),
onClick: () => {
trigger('createNewGroup');
},
},
];
});
}

const passItem = (type: string) => ({
id: `${type}Password`,
Expand Down