Skip to content

Commit 715a4f8

Browse files
committed
Restore device name
1 parent 9708596 commit 715a4f8

File tree

1 file changed

+12
-15
lines changed

1 file changed

+12
-15
lines changed

src/vector/platform/WebPlatform.ts

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -173,21 +173,18 @@ export default class WebPlatform extends VectorBasePlatform {
173173
}
174174

175175
getDefaultDeviceDisplayName(): string {
176-
// TODO: Revert this after launch
177-
// // strip query-string and fragment from uri
178-
// const u = url.parse(window.location.href);
179-
// u.protocol = "";
180-
// u.search = "";
181-
// u.hash = "";
182-
// // Remove trailing slash if present
183-
// u.pathname = u.pathname.replace(/\/$/, "");
184-
185-
// let appName = u.format();
186-
// // Remove leading slashes if present
187-
// appName = appName.replace(/^\/\//, "");
188-
// // `appName` is now in the format `develop.element.io`.
189-
190-
const appName = "Riot Web";
176+
// strip query-string and fragment from uri
177+
const u = url.parse(window.location.href);
178+
u.protocol = "";
179+
u.search = "";
180+
u.hash = "";
181+
// Remove trailing slash if present
182+
u.pathname = u.pathname.replace(/\/$/, "");
183+
184+
let appName = u.format();
185+
// Remove leading slashes if present
186+
appName = appName.replace(/^\/\//, "");
187+
// `appName` is now in the format `develop.element.io`.
191188

192189
const ua = new UAParser();
193190
const browserName = ua.getBrowser().name || "unknown browser";

0 commit comments

Comments
 (0)