remove BoardsUnfurl feature flag (#2051)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
This commit is contained in:
parent
b92890f238
commit
1aa60009ea
2 changed files with 4 additions and 11 deletions
|
@ -339,22 +339,18 @@ func defaultLoggingConfig() string {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *Plugin) MessageWillBePosted(_ *plugin.Context, post *mmModel.Post) (*mmModel.Post, 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) {
|
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 {
|
if _, ok := post.GetProps()["boards"]; ok {
|
||||||
post.AddProp("boards", nil)
|
post.AddProp("boards", nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
if !showBoardsUnfurl {
|
|
||||||
return post
|
|
||||||
}
|
|
||||||
|
|
||||||
firstLink, newPostMessage := getFirstLinkAndShortenAllBoardsLink(post.Message)
|
firstLink, newPostMessage := getFirstLinkAndShortenAllBoardsLink(post.Message)
|
||||||
post.Message = newPostMessage
|
post.Message = newPostMessage
|
||||||
|
|
||||||
|
|
|
@ -140,10 +140,7 @@ export default class Plugin {
|
||||||
}
|
}
|
||||||
this.channelHeaderButtonId = registry.registerChannelHeaderButtonAction(<FocalboardIcon/>, goToFocalboardWorkspace, 'Boards', 'Boards')
|
this.channelHeaderButtonId = registry.registerChannelHeaderButtonAction(<FocalboardIcon/>, goToFocalboardWorkspace, 'Boards', 'Boards')
|
||||||
this.registry.registerProduct('/boards', 'product-boards', 'Boards', '/boards/welcome', MainApp, HeaderComponent)
|
this.registry.registerProduct('/boards', 'product-boards', 'Boards', '/boards/welcome', MainApp, HeaderComponent)
|
||||||
|
|
||||||
if (mmStore.getState().entities.general.config?.['FeatureFlagBoardsUnfurl' as keyof Partial<ClientConfig>] === 'true') {
|
|
||||||
this.registry.registerPostWillRenderEmbedComponent((embed) => embed.type === 'boards', BoardsUnfurl, false)
|
this.registry.registerPostWillRenderEmbedComponent((embed) => embed.type === 'boards', BoardsUnfurl, false)
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
windowAny.frontendBaseURL = subpath + '/plug/focalboard'
|
windowAny.frontendBaseURL = subpath + '/plug/focalboard'
|
||||||
this.channelHeaderButtonId = registry.registerChannelHeaderButtonAction(<FocalboardIcon/>, () => {
|
this.channelHeaderButtonId = registry.registerChannelHeaderButtonAction(<FocalboardIcon/>, () => {
|
||||||
|
|
Loading…
Reference in a new issue