aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-tl.el
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus [a t] riseup [d o t] net>2022-11-14 12:36:11 +0100
committermarty hiatt <martianhiatus [a t] riseup [d o t] net>2022-11-14 12:36:11 +0100
commitd5883843fc82e1ba357d8561ce18434f1775307b (patch)
treeaedc5aaadfdf58efa8041c7f5252706f48368222 /lisp/mastodon-tl.el
parent60b707fe7fdb2471fa2a868d158ed1360bf8fb3f (diff)
view-instance-description -- pleroma compat
Diffstat (limited to 'lisp/mastodon-tl.el')
-rw-r--r--lisp/mastodon-tl.el9
1 files changed, 7 insertions, 2 deletions
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index ebf3570..a312c0c 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -1508,8 +1508,13 @@ INSTANCE is an instance domain name."
(username (alist-get 'username account))
(instance (if instance
(concat "https://" instance)
- (string-remove-suffix (concat "/@" username)
- url)))
+ ;; pleroma URL is https://instance.com/users/username
+ (if (string-suffix-p "users/" (url-basepath url))
+ (string-remove-suffix "/users/"
+ (url-basepath url))
+ ;; mastodon:
+ (string-remove-suffix (concat "/@" username)
+ url))))
(response (mastodon-http--get-json
(if user
(mastodon-http--api "instance")