aboutsummaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/mastodon-profile.el9
-rw-r--r--lisp/mastodon-tl.el13
2 files changed, 17 insertions, 5 deletions
diff --git a/lisp/mastodon-profile.el b/lisp/mastodon-profile.el
index 91103f1..6dbe572 100644
--- a/lisp/mastodon-profile.el
+++ b/lisp/mastodon-profile.el
@@ -287,7 +287,8 @@ JSON is the data returned by the server."
(defun mastodon-profile--update-user-profile-note ()
"Fetch user's profile note and display for editing."
(interactive)
- (let* ((url (mastodon-http--api "accounts/verify_credentials"))
+ (let* ((endpoint "accounts/verify_credentials")
+ (url (mastodon-http--api endpoint))
(json (mastodon-http--get-json url))
(source (alist-get 'source json))
(note (alist-get 'note source))
@@ -295,6 +296,9 @@ JSON is the data returned by the server."
(inhibit-read-only t))
(switch-to-buffer-other-window buffer)
(text-mode)
+ (mastodon-tl--set-buffer-spec (buffer-name buffer)
+ endpoint
+ nil)
(setq-local header-line-format
(propertize
"Edit your profile note. C-c C-c to send, C-c C-k to cancel."
@@ -497,6 +501,9 @@ This endpoint only holds a few preferences. For others, see
(switch-to-buffer-other-window buf)
(erase-buffer)
(special-mode)
+ (mastodon-tl--set-buffer-spec (buffer-name buf)
+ "preferences"
+ nil)
(let ((inhibit-read-only t))
(while response
(let ((el (pop response)))
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index dccf36a..b019272 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -1368,10 +1368,12 @@ BUFFER is buffer name, ENDPOINT is buffer's enpoint,
UPDATE-FUNCTION is its update function.
LINK-HEADER is the http Link header if present."
(setq mastodon-tl--buffer-spec
- `(buffer-name ,buffer
- endpoint ,endpoint
- update-function ,update-function
- link-header ,link-header)))
+ `(account ,(cons mastodon-active-user
+ mastodon-instance-url)
+ buffer-name ,buffer
+ endpoint ,endpoint
+ update-function ,update-function
+ link-header ,link-header)))
(defun mastodon-tl--more-json (endpoint id)
"Return JSON for timeline ENDPOINT before ID."
@@ -1951,6 +1953,9 @@ INSTANCE is an instance domain name."
(let ((buf (get-buffer-create "*mastodon-instance*")))
(with-current-buffer buf
(switch-to-buffer-other-window buf)
+ (mastodon-tl--set-buffer-spec (buffer-name buf)
+ "instance"
+ nil)
(let ((inhibit-read-only t))
(erase-buffer)
(special-mode)