Make WS messages less invasive
This commit is contained in:
parent
3a8d4b661c
commit
34fa91691c
1 changed files with 4 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue