From 78ce5795835545dae269ddb2790e3e19d48c241f Mon Sep 17 00:00:00 2001 From: Scott Bishel Date: Tue, 12 Apr 2022 10:51:06 -0600 Subject: [PATCH 1/2] update link for teams --- mattermost-plugin/webapp/src/index.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mattermost-plugin/webapp/src/index.tsx b/mattermost-plugin/webapp/src/index.tsx index c66f3bf4b..f59d71881 100644 --- a/mattermost-plugin/webapp/src/index.tsx +++ b/mattermost-plugin/webapp/src/index.tsx @@ -218,9 +218,9 @@ export default class Plugin { ) const goToFocalboardTemplate = () => { - const currentChannel = mmStore.getState().entities.channels.currentChannelId - TelemetryClient.trackEvent(TelemetryCategory, TelemetryActions.ClickChannelIntro, {channelID: currentChannel}) - window.open(`${windowAny.frontendBaseURL}/workspace/${currentChannel}`, '_blank', 'noopener') + const currentTeam = mmStore.getState().entities.teams.currentTeamId + TelemetryClient.trackEvent(TelemetryCategory, TelemetryActions.ClickChannelIntro, {teamID: currentTeam}) + window.open(`${windowAny.frontendBaseURL}/team/${currentTeam}`, '_blank', 'noopener') } if (registry.registerChannelIntroButtonAction) { @@ -236,8 +236,8 @@ export default class Plugin { } else { windowAny.frontendBaseURL = subpath + '/plug/focalboard' this.channelHeaderButtonId = registry.registerChannelHeaderButtonAction(, () => { - const currentChannel = mmStore.getState().entities.channels.currentChannelId - window.open(`${window.location.origin}/plug/focalboard/workspace/${currentChannel}`) + const currentTeam = mmStore.getState().entities.teams.currentTeamId + window.open(`${window.location.origin}/plug/focalboard/team/${currentTeam}`) }, 'Boards', 'Boards') this.registry.registerCustomRoute('/', MainApp) } From 36db05403607034597d26f45fb221385058d4914 Mon Sep 17 00:00:00 2001 From: Scott Bishel Date: Tue, 12 Apr 2022 14:19:15 -0600 Subject: [PATCH 2/2] removing else section as its not used --- mattermost-plugin/webapp/src/index.tsx | 7 ------- 1 file changed, 7 deletions(-) diff --git a/mattermost-plugin/webapp/src/index.tsx b/mattermost-plugin/webapp/src/index.tsx index f59d71881..2296e5f5c 100644 --- a/mattermost-plugin/webapp/src/index.tsx +++ b/mattermost-plugin/webapp/src/index.tsx @@ -233,13 +233,6 @@ export default class Plugin { } this.registry.registerPostWillRenderEmbedComponent((embed) => embed.type === 'boards', BoardsUnfurl, false) - } else { - windowAny.frontendBaseURL = subpath + '/plug/focalboard' - this.channelHeaderButtonId = registry.registerChannelHeaderButtonAction(, () => { - const currentTeam = mmStore.getState().entities.teams.currentTeamId - window.open(`${window.location.origin}/plug/focalboard/team/${currentTeam}`) - }, 'Boards', 'Boards') - this.registry.registerCustomRoute('/', MainApp) } const config = await octoClient.getClientConfig()