From 7078373fbbb3a5b483922abf82889a699a9831a0 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Fri, 28 Jan 2022 08:52:43 -0700 Subject: [PATCH] Support a config option to change the default device name (#20790) --- docs/config.md | 2 ++ src/vector/app.tsx | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/config.md b/docs/config.md index 4e889b94a2..4a5bf9a4a9 100644 --- a/docs/config.md +++ b/docs/config.md @@ -166,6 +166,8 @@ For a good example, see https://develop.element.io/config.json. the well-known location is used instead. 1. `analyticsOwner`: The entity that analytics data is being sent to. Used in copy when explaining to the user where data is being sent. If not set, defaults to `brand`. +1. `defaultDeviceDisplayName`: The default device display name to use for new logins + and registrations. If not set then a calculated version will be used. Note that `index.html` also has an og:image meta tag that is set to an image hosted on riot.im. This is the image used if links to your copy of Element diff --git a/src/vector/app.tsx b/src/vector/app.tsx index 809c9fb676..61069fa236 100644 --- a/src/vector/app.tsx +++ b/src/vector/app.tsx @@ -180,6 +180,8 @@ export async function loadApp(fragParams: {}) { return; } + const defaultDeviceName = config['defaultDeviceDisplayName'] ?? platform.getDefaultDeviceDisplayName(); + const MatrixChat = sdk.getComponent('structures.MatrixChat'); return ; }