diff options
Diffstat (limited to 'api/command_me.go')
-rw-r--r-- | api/command_me.go | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/api/command_me.go b/api/command_me.go new file mode 100644 index 000000000..f0154fe53 --- /dev/null +++ b/api/command_me.go @@ -0,0 +1,29 @@ +// Copyright (c) 2016 Mattermost, Inc. All Rights Reserved. +// See License.txt for license information. + +package api + +import ( + "github.com/mattermost/platform/model" +) + +type MeProvider struct { +} + +func init() { + RegisterCommandProvider(&MeProvider{}) +} + +func (me *MeProvider) GetCommand() *model.Command { + return &model.Command{ + Trigger: "me", + AutoComplete: true, + AutoCompleteDesc: "Do an action", + AutoCompleteHint: "[message]", + DisplayName: "me", + } +} + +func (me *MeProvider) DoCommand(c *Context, channelId string, message string) *model.CommandResponse { + return &model.CommandResponse{ResponseType: model.COMMAND_RESPONSE_TYPE_IN_CHANNEL, Text: "*" + message + "*"} +} |