Clean up /logout command flow and errors (#4918)

Этот коммит содержится в:
Joram Wilander
2016-12-30 13:12:43 -05:00
коммит произвёл Christopher Speller
родитель 28a7a2f200
Коммит 2a91e5e031
4 изменённых файлов: 19 добавлений и 14 удалений

Просмотреть файл

@@ -34,7 +34,7 @@ func (me *LogoutProvider) GetCommand(c *Context) *model.Command {
func (me *LogoutProvider) DoCommand(c *Context, args *model.CommandArgs, message string) *model.CommandResponse {
FAIL := &model.CommandResponse{ResponseType: model.COMMAND_RESPONSE_TYPE_EPHEMERAL, Text: c.T("api.command_logout.fail_message")}
SUCCESS := &model.CommandResponse{GotoLocation: "/", ResponseType: model.COMMAND_RESPONSE_TYPE_EPHEMERAL, Text: c.T("api.command_logout.success_message")}
SUCCESS := &model.CommandResponse{GotoLocation: "/login"}
// We can't actually remove the user's cookie from here so we just dump their session and let the browser figure it out
if c.Session.Id != "" {