Skip to content

Commit

Permalink
Fix: (ement-disconnect) Prevent error message
Browse files Browse the repository at this point in the history
Fixes #208.
  • Loading branch information
alphapapa committed Sep 9, 2024
1 parent a47de8a commit 3552980
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ Ement.el doesn't support encrypted rooms natively, but it can be used transparen
*Fixes*
+ Replies to edited messages are correctly sent to the original event (whereas previously they were sent to the edit, which caused reactions to not be shown). ([[https://github.com/alphapapa/ement.el/issues/230][#230]], [[https://github.com/alphapapa/ement.el/issues/277][#277]]. Thanks to [[https://github.com/phil-s][Phil Sainty]] for suggesting, and to [[https://github.com/dionisos2][dionisos]] for reporting.)
+ Set ~filter-buffer-substring-function~ in room buffers to prevent undesired text properties from being included in copied text. ([[https://github.com/alphapapa/ement.el/pull/278][#278]]. Thanks to [[https://github.com/phil-s][Phil Sainty]].)
+ Command ~ement-disconnect~ no longer shows an error message. ([[https://github.com/alphapapa/ement.el/issues/208][#208]].)

** 0.15.1

Expand Down
6 changes: 4 additions & 2 deletions ement.el
Original file line number Diff line number Diff line change
Expand Up @@ -356,8 +356,10 @@ in them won't work."
(dolist (session sessions)
(let ((user-id (ement-user-id (ement-session-user session))))
(when-let ((process (map-elt ement-syncs session)))
(ignore-errors
(delete-process process)))
;; Disable the sync process's ELSE handler, preventing error messages, but still
;; allowing `plz--respond' to clean up the buffer, etc.
(setf (process-get process :plz-else) #'ignore)
(delete-process process))
;; NOTE: I'd like to use `map-elt' here, but not until
;; <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=47368> is fixed, I guess.
(setf (alist-get session ement-syncs nil nil #'equal) nil
Expand Down

0 comments on commit 3552980

Please sign in to comment.