aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-toot.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/mastodon-toot.el')
-rw-r--r--lisp/mastodon-toot.el50
1 files changed, 28 insertions, 22 deletions
diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el
index 6eb271d..a3f337d 100644
--- a/lisp/mastodon-toot.el
+++ b/lisp/mastodon-toot.el
@@ -1072,26 +1072,27 @@ text of the toot being replied to in the compose buffer."
(booster (when boosted
(alist-get 'acct
(alist-get 'account toot)))))
- (mastodon-toot (when user
- (if booster
- (if (and (not (equal user booster))
- (not (member booster mentions)))
- ;; different booster, user and mentions:
- (mastodon-toot--mentions-to-string (append (list user booster) mentions nil))
- ;; booster is either user or in mentions:
- (if (not (member user mentions))
- ;; user not already in mentions:
- (mastodon-toot--mentions-to-string (append (list user) mentions nil))
- ;; user already in mentions:
- (mastodon-toot--mentions-to-string (copy-sequence mentions))))
- ;; ELSE no booster:
- (if (not (member user mentions))
- ;; user not in mentions:
- (mastodon-toot--mentions-to-string (append (list user) mentions nil))
- ;; user in mentions already:
- (mastodon-toot--mentions-to-string (copy-sequence mentions)))))
- id
- (or base-toot toot)))))
+ (mastodon-toot
+ (when user
+ (if booster
+ (if (and (not (equal user booster))
+ (not (member booster mentions)))
+ ;; different booster, user and mentions:
+ (mastodon-toot--mentions-to-string (append (list user booster) mentions nil))
+ ;; booster is either user or in mentions:
+ (if (not (member user mentions))
+ ;; user not already in mentions:
+ (mastodon-toot--mentions-to-string (append (list user) mentions nil))
+ ;; user already in mentions:
+ (mastodon-toot--mentions-to-string (copy-sequence mentions))))
+ ;; ELSE no booster:
+ (if (not (member user mentions))
+ ;; user not in mentions:
+ (mastodon-toot--mentions-to-string (append (list user) mentions nil))
+ ;; user in mentions already:
+ (mastodon-toot--mentions-to-string (copy-sequence mentions)))))
+ id
+ (or base-toot toot)))))
(defun mastodon-toot--toggle-warning ()
"Toggle `mastodon-toot--content-warning'."
@@ -1458,6 +1459,8 @@ REPLY-TEXT is the text of the toot being replied to."
(propertize (truncate-string-to-width
(mastodon-tl--render-text reply-text)
mastodon-toot-orig-in-reply-length)
+ 'read-only "Edit your message below."
+ 'toot-post-header t
'face '(variable-pitch :foreground "#7c6f64"))
"")
(propertize
@@ -1485,7 +1488,8 @@ REPLY-JSON is the full JSON of the toot being replied to."
(alist-get 'visibility reply-json)))
(reply-cw (alist-get 'spoiler_text reply-json)))
(when reply-to-user
- (insert (format "%s " reply-to-user))
+ (when (> (length reply-to-user) 0) ; self is "" unforch
+ (insert (format "%s " reply-to-user)))
(setq mastodon-toot--reply-to-id reply-to-id)
(unless (equal mastodon-toot--visibility reply-visibility)
(setq mastodon-toot--visibility reply-visibility))
@@ -1669,7 +1673,9 @@ EDIT means we are editing an existing toot, not composing a new one."
(buffer-exists (get-buffer buffer-name))
(buffer (or buffer-exists (get-buffer-create buffer-name)))
(inhibit-read-only t)
- (reply-text (alist-get 'content reply-json))
+ (reply-text (alist-get 'content
+ (or (alist-get 'reblog reply-json)
+ reply-json)))
(previous-window-config (list (current-window-configuration)
(point-marker))))
(switch-to-buffer-other-window buffer)