aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus [a t] riseup [d o t] net>2023-06-13 17:28:15 +0200
committermarty hiatt <martianhiatus [a t] riseup [d o t] net>2023-06-13 17:28:15 +0200
commitbc5ae8643130f55df84da9e07b5e292888d68770 (patch)
treedbac9aabee5f00341777c9916348b83987731c53
parent961ade55072028055ab7532d5f0976713a0dbe3a (diff)
mute thread from notifs view
uses base-toot-id, which i'm just praying is right.
-rw-r--r--lisp/mastodon-tl.el13
1 files changed, 8 insertions, 5 deletions
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index 6c1a771..4d49dea 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -1757,12 +1757,15 @@ Note that you can only (un)mute threads you have posted in."
If UNMUTE, unmute it."
(let ((endpoint (mastodon-tl--endpoint))
(mute-str (if unmute "unmute" "mute")))
- (when (mastodon-tl--buffer-type-eq 'thread)
+ (when (or (mastodon-tl--buffer-type-eq 'thread)
+ (mastodon-tl--buffer-type-eq 'notifications))
(let* ((id
- (save-match-data
- (string-match "statuses/\\(?2:[[:digit:]]+\\)/context"
- endpoint)
- (match-string 2 endpoint)))
+ (if (mastodon-tl--buffer-type-eq 'notifications)
+ (get-text-property (point) 'base-toot-id)
+ (save-match-data
+ (string-match "statuses/\\(?2:[[:digit:]]+\\)/context"
+ endpoint)
+ (match-string 2 endpoint))))
(we-posted-p (mastodon-tl--user-in-thread-p id))
(url (mastodon-http--api (format "statuses/%s/%s" id mute-str))))
(if (not we-posted-p)