Use isolated IPC API

This adjusts to match changes on the desktop side where we now use Electron's
context isolation feature to expose only the IPC channels and methods we
actually expect to use.
This commit is contained in:
J. Ryan Stinnett 2021-01-13 15:39:18 +00:00
parent 66080b5751
commit 58eca1aa7d
3 changed files with 40 additions and 22 deletions

View file

@ -1,8 +1,8 @@
/*
Copyright 2015, 2016 OpenMarket Ltd
Copyright 2017 Vector Creations Ltd
Copyright 2018, 2019, 2020 New Vector Ltd
Copyright 2019 Michael Telatynski <7t3chguy@gmail.com>
Copyright 2018 - 2021 New Vector Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@ -39,7 +39,7 @@ import { initRageshake } from "./rageshakesetup";
export const rageshakePromise = initRageshake();
export function preparePlatform() {
if (window.ipcRenderer) {
if (window.electron) {
console.log("Using Electron platform");
PlatformPeg.set(new ElectronPlatform());
} else if (window.matchMedia('(display-mode: standalone)').matches) {