From 1aa60009ea71d81a7f1f100a374cc5eff42f3ce6 Mon Sep 17 00:00:00 2001 From: Scott Bishel Date: Mon, 17 Jan 2022 10:07:50 -0700 Subject: [PATCH] remove BoardsUnfurl feature flag (#2051) Co-authored-by: Mattermod --- mattermost-plugin/server/plugin.go | 10 +++------- mattermost-plugin/webapp/src/index.tsx | 5 +---- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/mattermost-plugin/server/plugin.go b/mattermost-plugin/server/plugin.go index 2fb440835..be5f20430 100644 --- a/mattermost-plugin/server/plugin.go +++ b/mattermost-plugin/server/plugin.go @@ -339,22 +339,18 @@ func defaultLoggingConfig() string { } func (p *Plugin) MessageWillBePosted(_ *plugin.Context, post *mmModel.Post) (*mmModel.Post, string) { - return postWithBoardsEmbed(post, p.API.GetConfig().FeatureFlags.BoardsUnfurl), "" + return postWithBoardsEmbed(post), "" } func (p *Plugin) MessageWillBeUpdated(_ *plugin.Context, newPost, _ *mmModel.Post) (*mmModel.Post, string) { - return postWithBoardsEmbed(newPost, p.API.GetConfig().FeatureFlags.BoardsUnfurl), "" + return postWithBoardsEmbed(newPost), "" } -func postWithBoardsEmbed(post *mmModel.Post, showBoardsUnfurl bool) *mmModel.Post { +func postWithBoardsEmbed(post *mmModel.Post) *mmModel.Post { if _, ok := post.GetProps()["boards"]; ok { post.AddProp("boards", nil) } - if !showBoardsUnfurl { - return post - } - firstLink, newPostMessage := getFirstLinkAndShortenAllBoardsLink(post.Message) post.Message = newPostMessage diff --git a/mattermost-plugin/webapp/src/index.tsx b/mattermost-plugin/webapp/src/index.tsx index 2364ffcfc..10a854f57 100644 --- a/mattermost-plugin/webapp/src/index.tsx +++ b/mattermost-plugin/webapp/src/index.tsx @@ -140,10 +140,7 @@ export default class Plugin { } this.channelHeaderButtonId = registry.registerChannelHeaderButtonAction(, goToFocalboardWorkspace, 'Boards', 'Boards') this.registry.registerProduct('/boards', 'product-boards', 'Boards', '/boards/welcome', MainApp, HeaderComponent) - - if (mmStore.getState().entities.general.config?.['FeatureFlagBoardsUnfurl' as keyof Partial] === 'true') { - this.registry.registerPostWillRenderEmbedComponent((embed) => embed.type === 'boards', BoardsUnfurl, false) - } + this.registry.registerPostWillRenderEmbedComponent((embed) => embed.type === 'boards', BoardsUnfurl, false) } else { windowAny.frontendBaseURL = subpath + '/plug/focalboard' this.channelHeaderButtonId = registry.registerChannelHeaderButtonAction(, () => {