diff options
author | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2023-06-13 17:28:15 +0200 |
---|---|---|
committer | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2023-06-13 17:28:15 +0200 |
commit | bc5ae8643130f55df84da9e07b5e292888d68770 (patch) | |
tree | dbac9aabee5f00341777c9916348b83987731c53 /lisp | |
parent | 961ade55072028055ab7532d5f0976713a0dbe3a (diff) |
mute thread from notifs view
uses base-toot-id, which i'm just praying is right.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/mastodon-tl.el | 13 |
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) |