Merge branch 'develop' of https://github.com/vector-im/element-web into t3chguy/repo-merge
# Conflicts: # package.json
This commit is contained in:
commit
643d13066c
7 changed files with 63 additions and 31 deletions
|
@ -123,6 +123,11 @@ export default class ElectronPlatform extends VectorBasePlatform {
|
|||
window.electron!.send("userAccessToken", MatrixClientPeg.get()?.getAccessToken());
|
||||
});
|
||||
|
||||
// `homeserverUrl` (IPC) is requested by the main process. A reply is sent over the same channel.
|
||||
window.electron.on("homeserverUrl", () => {
|
||||
window.electron!.send("homeserverUrl", MatrixClientPeg.get()?.getHomeserverUrl());
|
||||
});
|
||||
|
||||
// `serverSupportedVersions` is requested by the main process when it needs to know if the
|
||||
// server supports a particular version. This is primarily used to detect authenticated media
|
||||
// support. A reply is sent over the same channel.
|
||||
|
|
|
@ -9,6 +9,7 @@ Please see LICENSE files in the repository root for full details.
|
|||
|
||||
import UAParser from "ua-parser-js";
|
||||
import { logger } from "matrix-js-sdk/src/logger";
|
||||
import { MatrixClientPeg } from "matrix-react-sdk/src/MatrixClientPeg";
|
||||
|
||||
import { UpdateCheckStatus, UpdateStatus } from "../../BasePlatform";
|
||||
import dis from "../../dispatcher/dispatcher";
|
||||
|
@ -62,10 +63,12 @@ export default class WebPlatform extends VectorBasePlatform {
|
|||
if (event.data?.["type"] === "userinfo" && event.data?.["responseKey"]) {
|
||||
const userId = localStorage.getItem("mx_user_id");
|
||||
const deviceId = localStorage.getItem("mx_device_id");
|
||||
const homeserver = MatrixClientPeg.get()?.getHomeserverUrl();
|
||||
event.source!.postMessage({
|
||||
responseKey: event.data["responseKey"],
|
||||
userId,
|
||||
deviceId,
|
||||
homeserver,
|
||||
});
|
||||
}
|
||||
} catch (e) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue