aboutsummaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus [a t] riseup [d o t] net>2022-06-27 18:14:20 +0200
committermarty hiatt <martianhiatus [a t] riseup [d o t] net>2022-06-27 18:44:13 +0200
commit04d35c7e28b8f50b47f2b86d5c4765f4f091d2a4 (patch)
tree9fc454ba6487ca5a6e4c493a109169d5b10d14e7 /lisp
parent8774ec32e36a9c12c9b772211009be12249b3efc (diff)
tl--thread: FIX fetching of toot id for notifs/use parent toot
Diffstat (limited to 'lisp')
-rw-r--r--lisp/mastodon-tl.el9
1 files changed, 7 insertions, 2 deletions
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index 9b91e1c..26753a4 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -1122,8 +1122,13 @@ webapp"
(defun mastodon-tl--thread ()
"Open thread buffer for toot under `point'."
(interactive)
- (let* ((id (mastodon-tl--as-string (mastodon-tl--toot-id
- (mastodon-tl--property 'toot-json))))
+ (let* ((id
+ (if (equal (mastodon-tl--get-endpoint) "notifications")
+ (if (mastodon-tl--property 'parent-toot)
+ (mastodon-tl--as-string (mastodon-tl--toot-id
+ (mastodon-tl--property 'parent-toot)))
+ (mastodon-tl--property 'base-toot-id))
+ (mastodon-tl--property 'base-toot-id)))
(url (mastodon-http--api (format "statuses/%s/context" id)))
(buffer (format "*mastodon-thread-%s*" id))
(toot (mastodon-tl--property 'toot-json))