From c2c5dbdb6464378b35b19667191d7aa87de22de3 Mon Sep 17 00:00:00 2001 From: yflory Date: Fri, 20 Dec 2019 15:48:29 +0100 Subject: [PATCH] Remove hash when joining a team with a link --- www/common/outer/team.js | 1 - www/teams/inner.js | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/www/common/outer/team.js b/www/common/outer/team.js index b7d6e3fb7..c41f728a0 100644 --- a/www/common/outer/team.js +++ b/www/common/outer/team.js @@ -1440,7 +1440,6 @@ define([ var json = Util.tryParse(val); if (!json) { return void cb({ error: "parseError" }); } - console.error("JSON", json); cb(json); }, { // cryptget opts network: ctx.store.network, diff --git a/www/teams/inner.js b/www/teams/inner.js index fb80caeb2..3f26874b2 100644 --- a/www/teams/inner.js +++ b/www/teams/inner.js @@ -1059,6 +1059,7 @@ define([ var hashData = Hash.parseTypeHash('invite', hash); var password = hashData.password; var seeds = InviteInner.deriveSeeds(hashData.key); + var sframeChan = common.getSframeChannel(); if (Object.keys(privateData.teams || {}).length >= Constants.MAX_TEAMS_SLOTS) { return void cb([ @@ -1146,6 +1147,7 @@ define([ return; } // No error: join successful! + sframeChan.event('EV_SET_HASH', ''); var $div = $('div.cp-team-list').empty(); refreshList(common, function (content) { $div.append(content); @@ -1170,7 +1172,6 @@ define([ nThen(function (waitFor) { // Get preview content. - var sframeChan = common.getSframeChannel(); sframeChan.query('Q_ANON_GET_PREVIEW_CONTENT', { seeds: seeds }, waitFor(function (err, json) { if (json && (json.error || !Object.keys(json).length)) { $(errorBlock).text(Messages.team_inviteInvalidLinkError).show();