branch: elpa/mastodon
commit 3e05dc0952c9d34d918e629a80492462adb7aa15
Merge: 2959ec90ed 8423cebdb3
Author: marty hiatt <martianhia...@disroot.org>
Commit: marty hiatt <martianhia...@disroot.org>

    Merge branch 'develop'
---
 README.org          | 14 +++++++++++---
 lisp/mastodon-tl.el |  2 +-
 lisp/mastodon.el    |  7 ++++---
 3 files changed, 16 insertions(+), 7 deletions(-)

diff --git a/README.org b/README.org
index caf9b0e629..3a73175c7e 100644
--- a/README.org
+++ b/README.org
@@ -8,6 +8,8 @@
 
 @@html: <a href="https://melpa.org/#/mastodon";><img alt="MELPA" 
src="https://melpa.org/packages/mastodon-badge.svg";></a>@@
 
+@@html: <a href="https://liberapay.com/martianh/donate";><img alt="Donate using 
Liberapay" src="https://liberapay.com/assets/widgets/donate.svg";></a>@@
+
 # @@html: <a href="https://ci.codeberg.org/martianh/mastodon.el";><img 
alt="Build Status" 
src="https://ci.codeberg.org/api/badges/martianh/mastodon.el/status.svg";></a>@@
 
 * README
@@ -585,9 +587,15 @@ am=, if you want to actually contribute a commit.
 ** Supporting =mastodon.el=
 
 If you'd like to support continued development of =mastodon.el=, I accept
-donations via paypal: [[https://paypal.me/martianh][paypal.me/martianh]]. If 
you would prefer a different
-payment method, please write to me at <mousebot {at} disroot.org> and I
-can provide IBAN or other bank account details.
+donations via paypal: [[https://paypal.me/martianh][paypal.me/martianh]]. 
+
+I also accept support via liberapay:
+
+@@html: <a href="https://liberapay.com/martianh/donate";><img alt="Donate using 
Liberapay" src="https://liberapay.com/assets/widgets/donate.svg";></a>@@
+
+If you would prefer a different payment method, please write to me at
+<mousebot {at} disroot.org> and I can provide IBAN or other bank account
+details.
 
 I don't have a tech worker's income, so even a small tip would help out.
 
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index da2a9122d3..73d7c5462f 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -183,7 +183,7 @@ nil."
   "A set of symbols (and fallback strings) to be used in timeline.
 If a symbol does not look right (tofu), it means your
 font settings do not support it."
-  :type '(alist :key-type symbol :value-type string))
+  :type '(alist :key-type symbol :value-type (cons string string)))
 
 (defcustom mastodon-tl-position-after-update nil
   "Defines where `point' should be located after a timeline update.
diff --git a/lisp/mastodon.el b/lisp/mastodon.el
index 9b4f570dad..b9d30a4f0d 100644
--- a/lisp/mastodon.el
+++ b/lisp/mastodon.el
@@ -496,14 +496,14 @@ If FORCE, do a lookup regardless of the result of 
`mastodon--fedi-url-p'."
   (interactive)
   (mastodon-url-lookup nil :force))
 
-(defun mastodon--fedi-url-p (query)
+(defun mastodon--fedi-url-p (url)
   "Check if QUERY resembles a fediverse URL."
   ;; calqued off 
https://github.com/tuskyapp/Tusky/blob/c8fc2418b8f5458a817bba221d025b822225e130/app/src/main/java/com/keylesspalace/tusky/BottomSheetActivity.kt
   ;; thx to Conny Duck!
   ;; mastodon at least seems to allow only [a-z0-9_] for usernames, plus "."
   ;; but not at beginning or end, see 
https://github.com/mastodon/mastodon/issues/6830
   ;; objects may have - in them
-  (let* ((uri-parsed (url-generic-parse-url query))
+  (let* ((uri-parsed (url-generic-parse-url url))
          (query (url-filename uri-parsed)))
     (save-match-data
       (or (string-match "^/@[^/]+$" query)
@@ -524,7 +524,8 @@ If FORCE, do a lookup regardless of the result of 
`mastodon--fedi-url-p'."
           (string-match "^/user[s]?/[[:alnum:]_]+/statuses/[[:digit:]]+$" 
query) ; hometown
           (string-match "^/notes/[[:alnum:]]+$" query) ; misskey post
           (string-match "^/w/[[:alnum:]_]+$" query) ; peertube post
-          ))))
+          ;; bsky via fed.brid.gy (unsure if this needs narrowing down?):
+          (string-prefix-p "https://fed.brid.gy/r/"; url)))))
 
 (defun mastodon-live-buffers ()
   "Return a list of open mastodon buffers.

Reply via email to