aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus [a t] riseup [d o t] net>2022-10-29 12:20:25 +0200
committermarty hiatt <martianhiatus [a t] riseup [d o t] net>2022-10-29 12:20:25 +0200
commit7b5b03b43f1287462775807f3bc4015473ad38c0 (patch)
treef19aaa886693151e4cf06a69694d6eefd0edada5
parent0b7c807612e64fbdb539c39399a1301f3de374ce (diff)
get instance from account/url, so it works for ppl on own instance
-rw-r--r--lisp/mastodon-tl.el11
1 files changed, 5 insertions, 6 deletions
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index ce5d745..130b01f 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -1414,13 +1414,12 @@ INSTANCE is an instance domain name."
(reblog (alist-get 'reblog toot))
(account (or (alist-get 'account reblog)
(alist-get 'account toot)))
- (acct (alist-get 'acct account))
+ (url (alist-get 'url account))
(username (alist-get 'username account))
- (instance
- (concat "https://"
- (or instance
- (string-remove-prefix (concat username "@")
- acct))))
+ (instance (if instance
+ (concat "https://" instance)
+ (string-remove-suffix (concat "/@" username)
+ url)))
(response (mastodon-http--get-json
(if user
(mastodon-http--api "instance")