blob: 9c608a8d351d78a0f965a5480cbd4e3922a542c5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
// Copyright (c) 2017-present Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
package app
import (
"github.com/mattermost/mattermost-server/model"
goi18n "github.com/nicksnyder/go-i18n/i18n"
)
type OpenProvider struct {
JoinProvider
}
const (
CMD_OPEN = "open"
)
func init() {
RegisterCommandProvider(&OpenProvider{})
}
func (open *OpenProvider) GetTrigger() string {
return CMD_OPEN
}
func (open *OpenProvider) GetCommand(a *App, T goi18n.TranslateFunc) *model.Command {
cmd := open.JoinProvider.GetCommand(a, T)
cmd.Trigger = CMD_OPEN
cmd.DisplayName = T("api.command_open.name")
return cmd
}
|