Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Read params from Session. TODO fix '++' and no-restricted-syntax
  • Loading branch information
glunardi committed Sep 19, 2021
1 parent 7f0919c commit 5638721
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
Expand Up @@ -161,6 +161,15 @@ class JoinHandler extends Component {
const setCustomData = (resp) => {
const { customdata } = resp;

// Can't figure out how to get the customdata out of
// UserSettings. Giving up, shoving them into the session
for (var i = 0; i < customdata.length; i++) {
var urlparameter = customdata[i];
for (const [key, value] of Object.entries(urlparameter)) {
Session.set(key, value);
}
}

return new Promise((resolve) => {
if (customdata.length) {
makeCall('addUserSettings', customdata).then(r => resolve(r));
Expand Down
Expand Up @@ -56,9 +56,12 @@ class Matrix extends Component {
).metadataProp;

const matrixRoomID = prop.metadata ? prop.metadata.matrixroomid : null;
const urlemail = Session.get('mail');
const urlregcode = Session.get('regcode');

const matrixtitle = `Matrix integration for ${Auth.confname}`;
const matrixurl = `/riot-embedded/index.html?urlroomid=${matrixRoomID}&urluserid=${Auth.fullname}`;
const matrixurl = `/riot-embedded/index.html?urlroomid=${matrixRoomID}&urlemail=${urlemail}&urlregcode=${urlregcode}`;

return (
<div
data-test="matrix"
Expand Down

0 comments on commit 5638721

Please sign in to comment.