diff options
-rw-r--r-- | lisp/mastodon-tl.el | 8 | ||||
-rw-r--r-- | lisp/mastodon-views.el | 13 |
2 files changed, 15 insertions, 6 deletions
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index 0c4f8af..d1f6149 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -85,6 +85,8 @@ (autoload 'mastodon-search--buf-type "mastodon-search") (autoload 'mastodon-http--api-search "mastodon-http") (autoload 'mastodon-views--insert-users-propertized-note "mastodon-views") ; for search pagination +(autoload 'mastodon-http--get-response "mastodon-http") +(autoload 'mastodon-search--insert-heading "mastodon-search") (defvar mastodon-toot--visibility) (defvar mastodon-toot-mode) @@ -2662,7 +2664,11 @@ JSON and http headers, without it just the JSON." "Initialize BUFFER-NAME with timeline targeted by ENDPOINT. UPDATE-FUNCTION is used to receive more toots. Runs synchronously. -Optional arg NOTE-TYPE means only get that type of note." +Optional arg NOTE-TYPE means only get that type of note. +PARAMS is an alist of any params to include in the request. +HEADERS are any headers to send in the request. +VIEW-NAME is a string, to be used as a heading for the view. +BINDING-STR is a string explaining any bindins in the view." ;; Used by `mastodon-notifications-get' and in views.el (let* ((exclude-types (when note-type (mastodon-notifications--filter-types-list note-type))) diff --git a/lisp/mastodon-views.el b/lisp/mastodon-views.el index 6e46eb9..e348cae 100644 --- a/lisp/mastodon-views.el +++ b/lisp/mastodon-views.el @@ -732,11 +732,13 @@ If INSTANCE is given, use that." (string-remove-suffix (concat "/@" username) url)))) -(defun mastodon-views--view-instance-description (&optional user brief instance misskey) +(defun mastodon-views--view-instance-description + (&optional user brief instance misskey) "View the details of the instance the current post's author is on. USER means to show the instance details for the logged in user. BRIEF means to show fewer details. -INSTANCE is an instance domain name." +INSTANCE is an instance domain name. +MISSKEY means the instance is a Misskey or derived server." (interactive) (if user (let ((response (mastodon-http--get-json @@ -794,15 +796,16 @@ USER, BRIEF, and INSTANCE are all for &optional misskey) "Display instance description RESPONSE in a new buffer. BRIEF means to show fewer details. -INSTANCE is the instance were are working with." +INSTANCE is the instance were are working with. +MISSKEY means the instance is a Misskey or derived server." (when response (let* ((domain (url-file-nondirectory instance)) (buf (get-buffer-create (format "*mastodon-instance-%s*" domain)))) (with-mastodon-buffer buf #'special-mode :other-window (if misskey - (mastodon-view--insert-json response) - (condition-case err + (mastodon-views--insert-json response) + (condition-case nil (progn (when brief (setq response |