Disable obsolete feature flags

This commit is contained in:
Scott Nonnenberg 2020-10-07 11:27:08 -07:00 committed by Josh Perez
parent 4206f1c463
commit b914b59969
8 changed files with 13 additions and 68 deletions

View file

@ -113,9 +113,6 @@
click: 'onClick', click: 'onClick',
}, },
setupCallManagerUI() { setupCallManagerUI() {
if (!window.CALLING) {
return;
}
if (this.callManagerView) { if (this.callManagerView) {
return; return;
} }

View file

@ -13,14 +13,9 @@ try {
const { app } = remote; const { app } = remote;
const { nativeTheme } = remote.require('electron'); const { nativeTheme } = remote.require('electron');
// Enable calling
window.CALLING = true;
window.PROTO_ROOT = 'protos'; window.PROTO_ROOT = 'protos';
const config = require('url').parse(window.location.toString(), true).query; const config = require('url').parse(window.location.toString(), true).query;
window.GV2 = false;
let title = config.name; let title = config.name;
if (config.environment !== 'production') { if (config.environment !== 'production') {
title += ` - ${config.environment}`; title += ` - ${config.environment}`;

View file

@ -619,17 +619,6 @@ type WhatIsThis = typeof window.WhatIsThis;
// we generate on load of each convo. // we generate on load of each convo.
window.Signal.RemoteConfig.initRemoteConfig(); window.Signal.RemoteConfig.initRemoteConfig();
// On startup, we don't want to wait for the remote config fetch if we've already
// learned that this instance supports GroupsV2.
// This is how we keep it sticky. Once it is enabled, we never disable it.
if (
window.Signal.RemoteConfig.isEnabled('desktop.gv2') ||
window.storage.get('gv2-enabled')
) {
window.GV2 = true;
window.storage.put('gv2-enabled', true);
}
try { try {
await Promise.all([ await Promise.all([
window.ConversationController.load(), window.ConversationController.load(),
@ -1633,10 +1622,6 @@ type WhatIsThis = typeof window.WhatIsThis;
return; return;
} }
window.GV2 = true;
await window.storage.put('gv2-enabled', true);
// Erase current manifest version so we re-process storage service data // Erase current manifest version so we re-process storage service data
await window.storage.remove('manifestVersion'); await window.storage.remove('manifestVersion');

View file

@ -248,10 +248,6 @@ export class ConversationHeader extends React.Component<PropsType> {
} }
public renderOutgoingAudioCallButton(): JSX.Element | null { public renderOutgoingAudioCallButton(): JSX.Element | null {
if (!window.CALLING) {
return null;
}
const { const {
i18n, i18n,
isMe, isMe,
@ -281,10 +277,6 @@ export class ConversationHeader extends React.Component<PropsType> {
} }
public renderOutgoingVideoCallButton(): JSX.Element | null { public renderOutgoingVideoCallButton(): JSX.Element | null {
if (!window.CALLING) {
return null;
}
const { i18n, isMe, type } = this.props; const { i18n, isMe, type } = this.props;
if (type === 'group' || isMe) { if (type === 'group' || isMe) {

View file

@ -586,11 +586,7 @@ async function mergeRecord(
hasConflict = await mergeContactRecord(storageID, storageRecord.contact); hasConflict = await mergeContactRecord(storageID, storageRecord.contact);
} else if (itemType === ITEM_TYPE.GROUPV1 && storageRecord.groupV1) { } else if (itemType === ITEM_TYPE.GROUPV1 && storageRecord.groupV1) {
hasConflict = await mergeGroupV1Record(storageID, storageRecord.groupV1); hasConflict = await mergeGroupV1Record(storageID, storageRecord.groupV1);
} else if ( } else if (itemType === ITEM_TYPE.GROUPV2 && storageRecord.groupV2) {
window.GV2 &&
itemType === ITEM_TYPE.GROUPV2 &&
storageRecord.groupV2
) {
hasConflict = await mergeGroupV2Record(storageID, storageRecord.groupV2); hasConflict = await mergeGroupV2Record(storageID, storageRecord.groupV2);
} else if (itemType === ITEM_TYPE.ACCOUNT && storageRecord.account) { } else if (itemType === ITEM_TYPE.ACCOUNT && storageRecord.account) {
hasConflict = await mergeAccountRecord(storageID, storageRecord.account); hasConflict = await mergeAccountRecord(storageID, storageRecord.account);

View file

@ -1199,14 +1199,6 @@ class MessageReceiverInner extends EventTarget {
); );
} }
if (!window.GV2 && msg.groupV2) {
this.removeFromCache(envelope);
window.log.info(
'MessageReceiver.handleDataMessage: dropping GroupV2 message'
);
return undefined;
}
this.deriveGroupsV2Data(msg); this.deriveGroupsV2Data(msg);
if ( if (
@ -1528,14 +1520,6 @@ class MessageReceiverInner extends EventTarget {
); );
} }
if (!window.GV2 && sentMessage.message.groupV2) {
this.removeFromCache(envelope);
window.log.info(
'MessageReceiver.handleSyncMessage: dropping GroupV2 message'
);
return undefined;
}
this.deriveGroupsV2Data(sentMessage.message); this.deriveGroupsV2Data(sentMessage.message);
window.log.info( window.log.info(

View file

@ -541,7 +541,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/inbox_view.js", "path": "js/views/inbox_view.js",
"line": " this.$('.call-manager-placeholder').append(this.callManagerView.el);", "line": " this.$('.call-manager-placeholder').append(this.callManagerView.el);",
"lineNumber": 126, "lineNumber": 123,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-05-28T17:42:35.329Z", "updated": "2020-05-28T17:42:35.329Z",
"reasonDetail": "<optional>" "reasonDetail": "<optional>"
@ -550,7 +550,7 @@
"rule": "jQuery-append(", "rule": "jQuery-append(",
"path": "js/views/inbox_view.js", "path": "js/views/inbox_view.js",
"line": " this.$('.call-manager-placeholder').append(this.callManagerView.el);", "line": " this.$('.call-manager-placeholder').append(this.callManagerView.el);",
"lineNumber": 126, "lineNumber": 123,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-05-28T17:42:35.329Z", "updated": "2020-05-28T17:42:35.329Z",
"reasonDetail": "<optional>" "reasonDetail": "<optional>"
@ -559,7 +559,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/inbox_view.js", "path": "js/views/inbox_view.js",
"line": " this.$('.left-pane-placeholder').append(this.leftPaneView.el);", "line": " this.$('.left-pane-placeholder').append(this.leftPaneView.el);",
"lineNumber": 137, "lineNumber": 134,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-05-28T17:42:35.329Z", "updated": "2020-05-28T17:42:35.329Z",
"reasonDetail": "Known DOM elements" "reasonDetail": "Known DOM elements"
@ -568,7 +568,7 @@
"rule": "jQuery-append(", "rule": "jQuery-append(",
"path": "js/views/inbox_view.js", "path": "js/views/inbox_view.js",
"line": " this.$('.left-pane-placeholder').append(this.leftPaneView.el);", "line": " this.$('.left-pane-placeholder').append(this.leftPaneView.el);",
"lineNumber": 137, "lineNumber": 134,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-05-28T17:42:35.329Z", "updated": "2020-05-28T17:42:35.329Z",
"reasonDetail": "Known DOM elements" "reasonDetail": "Known DOM elements"
@ -577,7 +577,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/inbox_view.js", "path": "js/views/inbox_view.js",
"line": " if (e && this.$(e.target).closest('.placeholder').length) {", "line": " if (e && this.$(e.target).closest('.placeholder').length) {",
"lineNumber": 190, "lineNumber": 187,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-05-28T17:42:35.329Z", "updated": "2020-05-28T17:42:35.329Z",
"reasonDetail": "Known DOM elements" "reasonDetail": "Known DOM elements"
@ -586,7 +586,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/inbox_view.js", "path": "js/views/inbox_view.js",
"line": " this.$('#header, .gutter').addClass('inactive');", "line": " this.$('#header, .gutter').addClass('inactive');",
"lineNumber": 194, "lineNumber": 191,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-05-28T17:42:35.329Z", "updated": "2020-05-28T17:42:35.329Z",
"reasonDetail": "Hardcoded selector" "reasonDetail": "Hardcoded selector"
@ -595,7 +595,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/inbox_view.js", "path": "js/views/inbox_view.js",
"line": " this.$('.conversation-stack').removeClass('inactive');", "line": " this.$('.conversation-stack').removeClass('inactive');",
"lineNumber": 195, "lineNumber": 192,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-09-11T17:24:56.124Z", "updated": "2020-09-11T17:24:56.124Z",
"reasonDetail": "Static selector argument" "reasonDetail": "Static selector argument"
@ -604,7 +604,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/inbox_view.js", "path": "js/views/inbox_view.js",
"line": " this.$('.conversation-stack').addClass('inactive');", "line": " this.$('.conversation-stack').addClass('inactive');",
"lineNumber": 198, "lineNumber": 195,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-05-28T17:42:35.329Z", "updated": "2020-05-28T17:42:35.329Z",
"reasonDetail": "Hardcoded selector" "reasonDetail": "Hardcoded selector"
@ -613,7 +613,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/inbox_view.js", "path": "js/views/inbox_view.js",
"line": " this.$('#header, .gutter').removeClass('inactive');", "line": " this.$('#header, .gutter').removeClass('inactive');",
"lineNumber": 199, "lineNumber": 196,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-09-11T17:24:56.124Z", "updated": "2020-09-11T17:24:56.124Z",
"reasonDetail": "Static selector argument" "reasonDetail": "Static selector argument"
@ -622,7 +622,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/inbox_view.js", "path": "js/views/inbox_view.js",
"line": " this.$('.conversation:first .menu').trigger('close');", "line": " this.$('.conversation:first .menu').trigger('close');",
"lineNumber": 200, "lineNumber": 197,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-05-28T17:42:35.329Z", "updated": "2020-05-28T17:42:35.329Z",
"reasonDetail": "Hardcoded selector" "reasonDetail": "Hardcoded selector"
@ -631,7 +631,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/inbox_view.js", "path": "js/views/inbox_view.js",
"line": " if (e && this.$(e.target).closest('.capture-audio').length > 0) {", "line": " if (e && this.$(e.target).closest('.capture-audio').length > 0) {",
"lineNumber": 220, "lineNumber": 217,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-05-29T18:29:18.234Z", "updated": "2020-05-29T18:29:18.234Z",
"reasonDetail": "Known DOM elements" "reasonDetail": "Known DOM elements"
@ -640,7 +640,7 @@
"rule": "jQuery-$(", "rule": "jQuery-$(",
"path": "js/views/inbox_view.js", "path": "js/views/inbox_view.js",
"line": " this.$('.conversation:first .recorder').trigger('close');", "line": " this.$('.conversation:first .recorder').trigger('close');",
"lineNumber": 223, "lineNumber": 220,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-05-29T18:29:18.234Z", "updated": "2020-05-29T18:29:18.234Z",
"reasonDetail": "Hardcoded selector" "reasonDetail": "Hardcoded selector"

4
ts/window.d.ts vendored
View file

@ -463,10 +463,6 @@ declare global {
hasSignalAccount: (number: string) => boolean; hasSignalAccount: (number: string) => boolean;
getServerTrustRoot: () => WhatIsThis; getServerTrustRoot: () => WhatIsThis;
readyForUpdates: () => void; readyForUpdates: () => void;
// Flags
CALLING: boolean;
GV2: boolean;
} }
interface Error { interface Error {