Enables debugging utilities in beta, alpha, dev

This commit is contained in:
Josh Perez 2023-01-19 15:41:53 -05:00 committed by GitHub
parent ef13eb06fc
commit d0494e5450
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -18,6 +18,7 @@ import type { StorageAccessType } from '../../types/Storage.d';
import { start as startConversationController } from '../../ConversationController';
import { MessageController } from '../../util/MessageController';
import { Environment, getEnvironment } from '../../environment';
import { isProduction } from '../../util/version';
window.addEventListener('contextmenu', e => {
const node = e.target as Element | null;
@ -42,7 +43,7 @@ window.Whisper.events = clone(window.Backbone.Events);
MessageController.install();
startConversationController();
if (getEnvironment() !== Environment.Production) {
if (!isProduction(window.SignalContext.getVersion())) {
const SignalDebug = {
Data: window.Signal.Data,
getConversation: (id: string) => window.ConversationController.get(id),