diff options
author | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2022-10-29 12:20:25 +0200 |
---|---|---|
committer | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2022-10-29 12:20:25 +0200 |
commit | 7b5b03b43f1287462775807f3bc4015473ad38c0 (patch) | |
tree | f19aaa886693151e4cf06a69694d6eefd0edada5 | |
parent | 0b7c807612e64fbdb539c39399a1301f3de374ce (diff) |
get instance from account/url, so it works for ppl on own instance
-rw-r--r-- | lisp/mastodon-tl.el | 11 |
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") |