From d49a802c3c3c452f60e654ea295d2ae73cdf2aa6 Mon Sep 17 00:00:00 2001 From: Doug Lauder Date: Fri, 15 Oct 2021 14:23:35 -0400 Subject: [PATCH] fix card URLs with no viewid (#1571) * fix card URLs with no viewid * revert ServerRoot change --- mattermost-plugin/server/plugin.go | 2 +- webapp/src/pages/boardPage.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mattermost-plugin/server/plugin.go b/mattermost-plugin/server/plugin.go index 38f89680a..b681d0e26 100644 --- a/mattermost-plugin/server/plugin.go +++ b/mattermost-plugin/server/plugin.go @@ -143,7 +143,7 @@ func (p *Plugin) OnActivate() error { p.wsPluginAdapter = ws.NewPluginAdapter(p.API, auth.New(cfg, db)) - mentionsBackend, err := createMentionsNotifyBackend(client, cfg.ServerRoot, logger) + mentionsBackend, err := createMentionsNotifyBackend(client, baseURL+"/boards", logger) if err != nil { return fmt.Errorf("error creating mentions notifications backend: %w", err) } diff --git a/webapp/src/pages/boardPage.tsx b/webapp/src/pages/boardPage.tsx index 16108b973..419b73192 100644 --- a/webapp/src/pages/boardPage.tsx +++ b/webapp/src/pages/boardPage.tsx @@ -92,7 +92,7 @@ const BoardPage = (props: Props): JSX.Element => { // Backward compatibility end const boardId = match.params.boardId - const viewId = match.params.viewId + const viewId = match.params.viewId === '0' ? '' : match.params.viewId if (!boardId) { // Load last viewed boardView