diff --git a/mattermost.el b/mattermost.el index 9e35814..b3f0067 100644 --- a/mattermost.el +++ b/mattermost.el @@ -105,7 +105,7 @@ if the user is not present" :on-message (lambda (ws frame) (let* ((text (websocket-frame-text frame)) (msg (json-parse-string text))) - (message "INCOMING> %s" msg))) + (lwarn 'mattermost :debug (format "INCOMING> %s" msg)))) :on-close (lambda (ws) (lwarn 'mattermost :error "websocket connection closed")))) @@ -215,13 +215,14 @@ user to check their status and select between them") (if (string-empty-p mattermost-host) ;; ToDo: throw error here (lwarn 'mattermost :error "`mattermost-host` cannot be empty")) - (mattermost-close) + (mattermost-disconnect) (let ((password (mattermost-read-password))) (mattermost-login mattermost-login-id password)) (mattermost-show-root)) -(defun mattermost-close () +(defun mattermost-disconnect () "Closes the connection with the Mattermost server" + (interactive) (unless (null mattermost-websocket) (websocket-close mattermost-websocket)) (setq mattermost-token nil