From 3c2ed555b3940a8890878d386c4987b90c0d048d Mon Sep 17 00:00:00 2001 From: Karmanyaah Malhotra Date: Sun, 7 Mar 2021 15:57:51 -0500 Subject: [PATCH] basic logout --- commands.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/commands.go b/commands.go index b08d34c..9b851da 100644 --- a/commands.go +++ b/commands.go @@ -423,13 +423,13 @@ func (handler *CommandHandler) CommandLogout(ce *CommandEvent) { ce.User.Conn = nil ce.User.removeFromJIDMap() ce.User.Token = "" - ce.User.JID = "" + //ce.User.JID = "" ce.User.Client = nil ce.User.Update() // // TODO this causes a foreign key violation, which should be fixed // //ce.User.JID = "" // ce.User.SetSession(nil) - // ce.Reply("Logged out successfully.") + ce.Reply("Logged out successfully.") } const cmdToggleHelp = `toggle - Toggle bridging of presence or read receipts` @@ -649,7 +649,7 @@ func (handler *CommandHandler) CommandHelp(ce *CommandEvent) { // cmdPrefix + cmdDeleteConnectionHelp, // cmdPrefix + cmdPingHelp, // cmdPrefix + cmdLoginMatrixHelp, - // cmdPrefix + cmdLogoutMatrixHelp, + cmdPrefix + cmdLogoutMatrixHelp, // cmdPrefix + cmdToggleHelp, cmdPrefix + cmdSyncHelp, cmdPrefix + cmdListHelp,