branch: elpa/mastodon
commit 5089e75cdbf3e2065d3cf1f8f9520c774373c60f
Author: marty hiatt <martianhia...@disroot.org>
Commit: marty hiatt <martianhia...@disroot.org>

    view-instance-desc patch for snac instances.
---
 lisp/mastodon-views.el | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lisp/mastodon-views.el b/lisp/mastodon-views.el
index a2d2169df9..a36af10f74 100644
--- a/lisp/mastodon-views.el
+++ b/lisp/mastodon-views.el
@@ -875,6 +875,10 @@ If INSTANCE is given, use that."
         ((string-suffix-p "profile/" (url-basepath url))
          (string-remove-suffix "/profile/"
                                (url-basepath url)))
+        ;; snac is https://instance.com/user
+        ((not (string-match-p "@" url))
+         ;; cull trailing slash:
+         (string-trim-right (url-basepath url) "/"))
         ;; mastodon is https://instance.com/@user
         (t
          (string-remove-suffix (concat "/@" username)

Reply via email to