From bc5ae8643130f55df84da9e07b5e292888d68770 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Tue, 13 Jun 2023 17:28:15 +0200 Subject: mute thread from notifs view uses base-toot-id, which i'm just praying is right. --- lisp/mastodon-tl.el | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'lisp/mastodon-tl.el') 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) -- cgit v1.2.3