fix away/offline/online commands repeating user message (#7060)

This commit is contained in:
Chris
2017-07-31 08:26:54 -07:00
committed by Harrison Healey
parent 09b49c26dd
commit 094c2f7308
3 changed files with 3 additions and 15 deletions

View File

@@ -33,11 +33,7 @@ func (me *AwayProvider) GetCommand(T goi18n.TranslateFunc) *model.Command {
}
func (me *AwayProvider) DoCommand(args *model.CommandArgs, message string) *model.CommandResponse {
rmsg := args.T("api.command_away.success")
if len(message) > 0 {
rmsg = message + " " + rmsg
}
SetStatusAwayIfNeeded(args.UserId, true)
return &model.CommandResponse{ResponseType: model.COMMAND_RESPONSE_TYPE_EPHEMERAL, Text: rmsg}
return &model.CommandResponse{ResponseType: model.COMMAND_RESPONSE_TYPE_EPHEMERAL, Text: args.T("api.command_away.success")}
}