From 2d3c8866466f0a58159184bb1886ee26865c2051 Mon Sep 17 00:00:00 2001 From: Robert Swain Date: Wed, 14 Jun 2017 13:27:15 +0200 Subject: [PATCH] AppsDrawer: Generate room alias for vrdemo --- src/components/views/rooms/AppsDrawer.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/views/rooms/AppsDrawer.js b/src/components/views/rooms/AppsDrawer.js index a917dde5f6..c132b395cd 100644 --- a/src/components/views/rooms/AppsDrawer.js +++ b/src/components/views/rooms/AppsDrawer.js @@ -65,7 +65,8 @@ module.exports = React.createClass({ break; } case 'vrdemo': - app.name = 'Matrix VR Demo'; + app.name = 'Matrix VR Demo - ' + app.data.roomAlias; + app.queryParams = '?roomAlias=' + encodeURIComponent(app.data.roomAlias); break; } @@ -155,6 +156,9 @@ module.exports = React.createClass({ appsStateEvent.vrDemo = { type: type, url: 'http://localhost:8000/vrdemo.html', + data: { + roomAlias: '#vrvc' + this.props.room.roomId.replace(/[^A-Za-z0-9]/g, '_') + Date.now(), + }, }; break; case 'custom':