From 846d588dc87b5135dc18b1d7cc873acadfd4c5a3 Mon Sep 17 00:00:00 2001 From: mousebot Date: Thu, 21 Oct 2021 20:42:28 +0200 Subject: redrafts adopt reply to id from deleted toot --- lisp/mastodon-toot.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lisp') diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el index 3a53851..d6502f8 100644 --- a/lisp/mastodon-toot.el +++ b/lisp/mastodon-toot.el @@ -279,7 +279,8 @@ Remove MARKER if REMOVE is non-nil, otherwise add it." (id (mastodon-tl--as-string (mastodon-tl--toot-id toot))) (url (mastodon-http--api (format "statuses/%s" id))) (toot-cw (cdr (assoc 'spoiler_text toot))) - (toot-visibility (cdr (assoc 'visibility toot)))) + (toot-visibility (cdr (assoc 'visibility toot))) + (reply-id (cdr (assoc 'in_reply_to_id toot)))) (if (or (cdr (assoc 'reblog toot)) (not (equal (cdr (assoc 'acct (cdr (assoc 'account toot)))) @@ -297,7 +298,9 @@ Remove MARKER if REMOVE is non-nil, otherwise add it." (mastodon-toot--compose-buffer nil nil) (goto-char (point-max)) (insert content) - ;; adopt visibility and CW from deleted toot: + ;; adopt reply-to-id, visibility and CW from deleted toot: + (when reply-id + (setq mastodon-toot--reply-to-id reply-id)) (setq mastodon-toot--visibility toot-visibility) (when (not (equal toot-cw "")) (setq mastodon-toot--content-warning t) -- cgit v1.2.3