summaryrefslogtreecommitdiffstats
path: root/app/command.go
diff options
context:
space:
mode:
authorGeorge Goldberg <george@gberg.me>2017-03-17 16:29:26 +0000
committerGeorge Goldberg <george@gberg.me>2017-03-17 16:29:26 +0000
commit7f266c19511171f509ae8a60170de10c8d10b41e (patch)
tree04cd68ac4722313abec3ea47cc7cda229e463b1d /app/command.go
parentbfae88e60c7a623afae82e06ce1421ca778c06e7 (diff)
parent8568afe5b4fb4d26b14fbc0d21f088eaa490b314 (diff)
downloadchat-7f266c19511171f509ae8a60170de10c8d10b41e.tar.gz
chat-7f266c19511171f509ae8a60170de10c8d10b41e.tar.bz2
chat-7f266c19511171f509ae8a60170de10c8d10b41e.zip
Merge branch 'release-3.7' into master.
Diffstat (limited to 'app/command.go')
-rw-r--r--app/command.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/command.go b/app/command.go
index 491813efe..4583cf81b 100644
--- a/app/command.go
+++ b/app/command.go
@@ -38,7 +38,7 @@ func GetCommandProvider(name string) CommandProvider {
return nil
}
-func CreateCommandPost(post *model.Post, teamId string, response *model.CommandResponse) (*model.Post, *model.AppError) {
+func CreateCommandPost(post *model.Post, teamId string, response *model.CommandResponse, siteURL string) (*model.Post, *model.AppError) {
post.Message = parseSlackLinksToMarkdown(response.Text)
post.CreateAt = model.GetMillis()
@@ -48,7 +48,7 @@ func CreateCommandPost(post *model.Post, teamId string, response *model.CommandR
switch response.ResponseType {
case model.COMMAND_RESPONSE_TYPE_IN_CHANNEL:
- return CreatePost(post, teamId, true)
+ return CreatePost(post, teamId, true, siteURL)
case model.COMMAND_RESPONSE_TYPE_EPHEMERAL:
if response.Text == "" {
return post, nil
@@ -237,7 +237,7 @@ func HandleCommandResponse(command *model.Command, args *model.CommandArgs, resp
}
}
- if _, err := CreateCommandPost(post, args.TeamId, response); err != nil {
+ if _, err := CreateCommandPost(post, args.TeamId, response, args.SiteURL); err != nil {
l4g.Error(err.Error())
}