aboutsummaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authormousebot <mousebot@riseup.net>2021-10-21 20:42:28 +0200
committermousebot <mousebot@riseup.net>2021-10-21 20:42:28 +0200
commit846d588dc87b5135dc18b1d7cc873acadfd4c5a3 (patch)
tree205afd6d0a7d86f6e97a37a4f50841c2c4e557aa /lisp
parent4e4c6358477aa74424638b1df6fdb13a77e6aaa0 (diff)
redrafts adopt reply to id from deleted toot
Diffstat (limited to 'lisp')
-rw-r--r--lisp/mastodon-toot.el7
1 files changed, 5 insertions, 2 deletions
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)