From 907a28bca6c1e281183f24dd1f5c618fdbb85065 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Fri, 2 Sep 2022 15:10:47 +0200 Subject: add optional instance arg to -view-instance-description --- lisp/mastodon-tl.el | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index b59be8b..8e3ab30 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -1379,10 +1379,11 @@ BRIEF means show fewer details." (interactive) (mastodon-tl-view-instance-description nil :brief)) -(defun mastodon-tl-view-instance-description (&optional user brief) +(defun mastodon-tl-view-instance-description (&optional user brief instance) "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." +BRIEF means to show fewer details. +INSTANCE is an instance domain name." (interactive) (mastodon-tl--do-if-toot (let* ((toot (mastodon-tl--property 'toot-json)) @@ -1393,8 +1394,9 @@ BRIEF means to show fewer details." (username (alist-get 'username account)) (instance (concat "https://" - (string-remove-prefix (concat username "@") - acct))) + (or instance + (string-remove-prefix (concat username "@") + acct)))) (response (mastodon-http--get-json (if user (mastodon-http--api "instance") -- cgit v1.2.3