diff options
author | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2022-09-02 15:10:47 +0200 |
---|---|---|
committer | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2022-09-02 15:14:47 +0200 |
commit | 907a28bca6c1e281183f24dd1f5c618fdbb85065 (patch) | |
tree | e6c6786a160608a142906a0b93d7f39f2d9f52a4 | |
parent | 36d7ff1a7f3484f19c876f56848443c96dbd04ff (diff) |
add optional instance arg to -view-instance-description
-rw-r--r-- | lisp/mastodon-tl.el | 10 |
1 files 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") |