Mono repo -> Master (#22553)
Combines the following repositories into one: https://github.com/mattermost/mattermost-server https://github.com/mattermost/mattermost-webapp https://github.com/mattermost/focalboard https://github.com/mattermost/mattermost-plugin-playbooks
Этот коммит содержится в:
33
server/channels/app/slashcommands/command_open.go
Обычный файл
33
server/channels/app/slashcommands/command_open.go
Обычный файл
@@ -0,0 +1,33 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
package slashcommands
|
||||
|
||||
import (
|
||||
"github.com/mattermost/mattermost-server/v6/model"
|
||||
"github.com/mattermost/mattermost-server/v6/server/channels/app"
|
||||
"github.com/mattermost/mattermost-server/v6/server/platform/shared/i18n"
|
||||
)
|
||||
|
||||
type OpenProvider struct {
|
||||
JoinProvider
|
||||
}
|
||||
|
||||
const (
|
||||
CmdOpen = "open"
|
||||
)
|
||||
|
||||
func init() {
|
||||
app.RegisterCommandProvider(&OpenProvider{})
|
||||
}
|
||||
|
||||
func (open *OpenProvider) GetTrigger() string {
|
||||
return CmdOpen
|
||||
}
|
||||
|
||||
func (open *OpenProvider) GetCommand(a *app.App, T i18n.TranslateFunc) *model.Command {
|
||||
cmd := open.JoinProvider.GetCommand(a, T)
|
||||
cmd.Trigger = CmdOpen
|
||||
cmd.DisplayName = T("api.command_open.name")
|
||||
return cmd
|
||||
}
|
||||
Ссылка в новой задаче
Block a user