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.el7
1 files changed, 7 insertions, 0 deletions
diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el
index 069c914..9714854 100644
--- a/lisp/mastodon-toot.el
+++ b/lisp/mastodon-toot.el
@@ -736,6 +736,13 @@ instance to edit a toot."
(url (mastodon-http--api (format "statuses/%s/history" id))))
(mastodon-http--get-json url)))
+(defun mastodon-toot--edited-at ()
+ "Return edited_at timestamp of TOOT.
+Is also a predicated test for whether a toot has been edited."
+ (let* ((toot (or (mastodon-tl--property 'base-toot)
+ (mastodon-tl--property 'toot-json))))
+ (alist-get 'edited_at toot)))
+
(defun mastodon-toot--restore-previous-window-config (config)
"Restore the window CONFIG after killing the toot compose buffer.
Buffer-local variable `mastodon-toot-previous-window-config' holds the config."