Fix: (ement-room-join) Complete session from other buffers

Thanks to @matheusfillipe for reporting.
This commit is contained in:
Adam Porter 2021-08-04 01:49:10 -05:00
parent 1f530d4ab3
commit 08e5655f00

View file

@ -470,10 +470,12 @@ Interactively, set the current buffer's ROOM's TOPIC."
(scroll-up-command)
(end-of-buffer (set-window-point nil (point-max))))))
(declare-function ement-complete-session "ement")
(defun ement-room-join (id-or-alias session)
"Join room by ID-OR-ALIAS on SESSION."
(interactive (list (read-string "Join room (ID or alias): ")
ement-session))
(or ement-session
(ement-complete-session))))
(cl-assert id-or-alias) (cl-assert session)
(let ((endpoint (format "join/%s" (url-hexify-string id-or-alias))))
(ement-api session endpoint :method 'post :data ""