From c7b475160d2e7712e339e15adf168529f71b52c6 Mon Sep 17 00:00:00 2001 From: mousebot Date: Sat, 19 Mar 2022 16:07:44 +0100 Subject: attach parent JSON to fave/boost notifs to fix replies because we switched to using boost/fave JSON rather than parent, as 'toot-json, replies to these toots were broken (mentions, etc.) so now we attach both bits of data and selectively pull from each. --- lisp/mastodon-toot.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lisp/mastodon-toot.el') diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el index 780e726..07ab400 100644 --- a/lisp/mastodon-toot.el +++ b/lisp/mastodon-toot.el @@ -617,11 +617,12 @@ candidate ARG. IGNORED remains a mystery." "Reply to toot at `point'." (interactive) (let* ((toot (mastodon-tl--property 'toot-json)) + (parent (mastodon-tl--property 'parent-toot)) ; for new notifs handling (id (mastodon-tl--as-string (mastodon-tl--field 'id toot))) (account (mastodon-tl--field 'account toot)) (user (alist-get 'acct account)) - (mentions (mastodon-toot--mentions toot)) - (boosted (mastodon-tl--field 'reblog toot)) + (mentions (mastodon-toot--mentions (or parent toot))) + (boosted (mastodon-tl--field 'reblog (or parent toot))) (booster (when boosted (alist-get 'acct (alist-get 'account toot))))) @@ -637,7 +638,7 @@ candidate ARG. IGNORED remains a mystery." mentions)) (concat (mastodon-toot--process-local user) mentions))) - id toot))) + id (or parent toot)))) (defun mastodon-toot--toggle-warning () "Toggle `mastodon-toot--content-warning'." -- cgit v1.2.3