diff options
author | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2023-03-24 09:33:37 +0100 |
---|---|---|
committer | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2023-03-24 09:39:08 +0100 |
commit | 93ef38d88b277e8d5991e887034a7622879c91b1 (patch) | |
tree | 4a72b3e8263ae979ce5dcac69570fe91306590bf /lisp | |
parent | c63bae68e445135882a2454c03ea28c3e13095cc (diff) |
FIX #418. set-cw check for nil as well as string-empty
set-cw is called by setup-as-reply, which always runs in --compose-buffer.
perhaps it shouldn't.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/mastodon-toot.el | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el index 82a9482..65fc357 100644 --- a/lisp/mastodon-toot.el +++ b/lisp/mastodon-toot.el @@ -591,7 +591,8 @@ NO-REDRAFT means delete toot only." (defun mastodon-toot--set-cw (&optional cw) "Set content warning to CW if it is non-nil." - (unless (string-empty-p cw) + (unless (or (null cw) ; cw is nil for `mastodon-tl--dm-user' + (string-empty-p cw)) (setq mastodon-toot--content-warning t) (setq mastodon-toot--content-warning-from-reply-or-redraft cw))) @@ -1637,6 +1638,10 @@ EDIT means we are editing an existing toot, not composing a new one." (mastodon-toot--display-docs-and-status-fields (when mastodon-toot-display-orig-in-reply-buffer reply-text)) + ;; `reply-to-user' (alone) is also used by `mastodon-tl--dm-user', so + ;; perhaps we should not always call --setup-as-reply, or make its + ;; workings conditional on reply-to-id. currently it only checks for + ;; reply-to-user. (mastodon-toot--setup-as-reply reply-to-user reply-to-id reply-json)) (unless mastodon-toot--max-toot-chars ;; no need to fetch from `mastodon-profile-account-settings' as |