diff --git a/js/views/inbox_view.js b/js/views/inbox_view.js index 46dfbb596b00..12469d24cc69 100644 --- a/js/views/inbox_view.js +++ b/js/views/inbox_view.js @@ -113,9 +113,6 @@ click: 'onClick', }, setupCallManagerUI() { - if (!window.CALLING) { - return; - } if (this.callManagerView) { return; } diff --git a/preload.js b/preload.js index 7660bef8d0e2..3f8549e8e53c 100644 --- a/preload.js +++ b/preload.js @@ -13,14 +13,9 @@ try { const { app } = remote; const { nativeTheme } = remote.require('electron'); - // Enable calling - window.CALLING = true; - window.PROTO_ROOT = 'protos'; const config = require('url').parse(window.location.toString(), true).query; - window.GV2 = false; - let title = config.name; if (config.environment !== 'production') { title += ` - ${config.environment}`; diff --git a/ts/background.ts b/ts/background.ts index 43cbba723f28..16bdb31a9640 100644 --- a/ts/background.ts +++ b/ts/background.ts @@ -619,17 +619,6 @@ type WhatIsThis = typeof window.WhatIsThis; // we generate on load of each convo. 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 { await Promise.all([ window.ConversationController.load(), @@ -1633,10 +1622,6 @@ type WhatIsThis = typeof window.WhatIsThis; return; } - window.GV2 = true; - - await window.storage.put('gv2-enabled', true); - // Erase current manifest version so we re-process storage service data await window.storage.remove('manifestVersion'); diff --git a/ts/components/conversation/ConversationHeader.tsx b/ts/components/conversation/ConversationHeader.tsx index d719d194426d..4abb8d796fda 100644 --- a/ts/components/conversation/ConversationHeader.tsx +++ b/ts/components/conversation/ConversationHeader.tsx @@ -248,10 +248,6 @@ export class ConversationHeader extends React.Component { } public renderOutgoingAudioCallButton(): JSX.Element | null { - if (!window.CALLING) { - return null; - } - const { i18n, isMe, @@ -281,10 +277,6 @@ export class ConversationHeader extends React.Component { } public renderOutgoingVideoCallButton(): JSX.Element | null { - if (!window.CALLING) { - return null; - } - const { i18n, isMe, type } = this.props; if (type === 'group' || isMe) { diff --git a/ts/services/storage.ts b/ts/services/storage.ts index 1a040c13942f..1723316b9d4d 100644 --- a/ts/services/storage.ts +++ b/ts/services/storage.ts @@ -586,11 +586,7 @@ async function mergeRecord( hasConflict = await mergeContactRecord(storageID, storageRecord.contact); } else if (itemType === ITEM_TYPE.GROUPV1 && storageRecord.groupV1) { hasConflict = await mergeGroupV1Record(storageID, storageRecord.groupV1); - } else if ( - window.GV2 && - itemType === ITEM_TYPE.GROUPV2 && - storageRecord.groupV2 - ) { + } else if (itemType === ITEM_TYPE.GROUPV2 && storageRecord.groupV2) { hasConflict = await mergeGroupV2Record(storageID, storageRecord.groupV2); } else if (itemType === ITEM_TYPE.ACCOUNT && storageRecord.account) { hasConflict = await mergeAccountRecord(storageID, storageRecord.account); diff --git a/ts/textsecure/MessageReceiver.ts b/ts/textsecure/MessageReceiver.ts index c702ab00b449..8de7ba3d974a 100644 --- a/ts/textsecure/MessageReceiver.ts +++ b/ts/textsecure/MessageReceiver.ts @@ -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); 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); window.log.info( diff --git a/ts/util/lint/exceptions.json b/ts/util/lint/exceptions.json index 85c4d4762e7a..bfe8334d5356 100644 --- a/ts/util/lint/exceptions.json +++ b/ts/util/lint/exceptions.json @@ -541,7 +541,7 @@ "rule": "jQuery-$(", "path": "js/views/inbox_view.js", "line": " this.$('.call-manager-placeholder').append(this.callManagerView.el);", - "lineNumber": 126, + "lineNumber": 123, "reasonCategory": "usageTrusted", "updated": "2020-05-28T17:42:35.329Z", "reasonDetail": "" @@ -550,7 +550,7 @@ "rule": "jQuery-append(", "path": "js/views/inbox_view.js", "line": " this.$('.call-manager-placeholder').append(this.callManagerView.el);", - "lineNumber": 126, + "lineNumber": 123, "reasonCategory": "usageTrusted", "updated": "2020-05-28T17:42:35.329Z", "reasonDetail": "" @@ -559,7 +559,7 @@ "rule": "jQuery-$(", "path": "js/views/inbox_view.js", "line": " this.$('.left-pane-placeholder').append(this.leftPaneView.el);", - "lineNumber": 137, + "lineNumber": 134, "reasonCategory": "usageTrusted", "updated": "2020-05-28T17:42:35.329Z", "reasonDetail": "Known DOM elements" @@ -568,7 +568,7 @@ "rule": "jQuery-append(", "path": "js/views/inbox_view.js", "line": " this.$('.left-pane-placeholder').append(this.leftPaneView.el);", - "lineNumber": 137, + "lineNumber": 134, "reasonCategory": "usageTrusted", "updated": "2020-05-28T17:42:35.329Z", "reasonDetail": "Known DOM elements" @@ -577,7 +577,7 @@ "rule": "jQuery-$(", "path": "js/views/inbox_view.js", "line": " if (e && this.$(e.target).closest('.placeholder').length) {", - "lineNumber": 190, + "lineNumber": 187, "reasonCategory": "usageTrusted", "updated": "2020-05-28T17:42:35.329Z", "reasonDetail": "Known DOM elements" @@ -586,7 +586,7 @@ "rule": "jQuery-$(", "path": "js/views/inbox_view.js", "line": " this.$('#header, .gutter').addClass('inactive');", - "lineNumber": 194, + "lineNumber": 191, "reasonCategory": "usageTrusted", "updated": "2020-05-28T17:42:35.329Z", "reasonDetail": "Hardcoded selector" @@ -595,7 +595,7 @@ "rule": "jQuery-$(", "path": "js/views/inbox_view.js", "line": " this.$('.conversation-stack').removeClass('inactive');", - "lineNumber": 195, + "lineNumber": 192, "reasonCategory": "usageTrusted", "updated": "2020-09-11T17:24:56.124Z", "reasonDetail": "Static selector argument" @@ -604,7 +604,7 @@ "rule": "jQuery-$(", "path": "js/views/inbox_view.js", "line": " this.$('.conversation-stack').addClass('inactive');", - "lineNumber": 198, + "lineNumber": 195, "reasonCategory": "usageTrusted", "updated": "2020-05-28T17:42:35.329Z", "reasonDetail": "Hardcoded selector" @@ -613,7 +613,7 @@ "rule": "jQuery-$(", "path": "js/views/inbox_view.js", "line": " this.$('#header, .gutter').removeClass('inactive');", - "lineNumber": 199, + "lineNumber": 196, "reasonCategory": "usageTrusted", "updated": "2020-09-11T17:24:56.124Z", "reasonDetail": "Static selector argument" @@ -622,7 +622,7 @@ "rule": "jQuery-$(", "path": "js/views/inbox_view.js", "line": " this.$('.conversation:first .menu').trigger('close');", - "lineNumber": 200, + "lineNumber": 197, "reasonCategory": "usageTrusted", "updated": "2020-05-28T17:42:35.329Z", "reasonDetail": "Hardcoded selector" @@ -631,7 +631,7 @@ "rule": "jQuery-$(", "path": "js/views/inbox_view.js", "line": " if (e && this.$(e.target).closest('.capture-audio').length > 0) {", - "lineNumber": 220, + "lineNumber": 217, "reasonCategory": "usageTrusted", "updated": "2020-05-29T18:29:18.234Z", "reasonDetail": "Known DOM elements" @@ -640,7 +640,7 @@ "rule": "jQuery-$(", "path": "js/views/inbox_view.js", "line": " this.$('.conversation:first .recorder').trigger('close');", - "lineNumber": 223, + "lineNumber": 220, "reasonCategory": "usageTrusted", "updated": "2020-05-29T18:29:18.234Z", "reasonDetail": "Hardcoded selector" diff --git a/ts/window.d.ts b/ts/window.d.ts index 39a25f49daba..785e23831e4e 100644 --- a/ts/window.d.ts +++ b/ts/window.d.ts @@ -463,10 +463,6 @@ declare global { hasSignalAccount: (number: string) => boolean; getServerTrustRoot: () => WhatIsThis; readyForUpdates: () => void; - - // Flags - CALLING: boolean; - GV2: boolean; } interface Error {