summaryrefslogtreecommitdiffstats
path: root/app/command_logout.go
diff options
context:
space:
mode:
authorChris <ccbrown112@gmail.com>2017-09-14 12:01:44 -0500
committerHarrison Healey <harrisonmhealey@gmail.com>2017-09-14 13:01:44 -0400
commitb6fb98a43176215f16fc52b64abebde51355e5c1 (patch)
tree095a2006bdfdd30d1a9c4fc4e604924fc0f50225 /app/command_logout.go
parentaf81f7e48bd2afaaa8c71f78bf86bdc00b104e4d (diff)
downloadchat-b6fb98a43176215f16fc52b64abebde51355e5c1.tar.gz
chat-b6fb98a43176215f16fc52b64abebde51355e5c1.tar.bz2
chat-b6fb98a43176215f16fc52b64abebde51355e5c1.zip
remove more global references (#7442)
Diffstat (limited to 'app/command_logout.go')
-rw-r--r--app/command_logout.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/command_logout.go b/app/command_logout.go
index 0cb5293c3..b21045b6a 100644
--- a/app/command_logout.go
+++ b/app/command_logout.go
@@ -33,13 +33,13 @@ func (me *LogoutProvider) GetCommand(T goi18n.TranslateFunc) *model.Command {
}
}
-func (me *LogoutProvider) DoCommand(args *model.CommandArgs, message string) *model.CommandResponse {
+func (me *LogoutProvider) DoCommand(a *App, args *model.CommandArgs, message string) *model.CommandResponse {
FAIL := &model.CommandResponse{ResponseType: model.COMMAND_RESPONSE_TYPE_EPHEMERAL, Text: args.T("api.command_logout.fail_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 args.Session.Id != "" {
- if err := Global().RevokeSessionById(args.Session.Id); err != nil {
+ if err := a.RevokeSessionById(args.Session.Id); err != nil {
return FAIL
}
return SUCCESS