aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus@riseup.net>2024-08-06 10:17:40 +0200
committermarty hiatt <martianhiatus@riseup.net>2024-08-06 10:17:40 +0200
commit6f4c51e34f7d8c153b5b9a1954d007cd161cd90e (patch)
treec14de6a49b31db9ff2d37ac5b4ae9f541354d72f
parent2b8bf77ee00c25885cdc6ebed3ea3b0897dd245f (diff)
add mastodon-tl--field-status
-rw-r--r--lisp/mastodon-tl.el6
1 files changed, 6 insertions, 0 deletions
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index a3cbd60..5e56dc3 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -1997,6 +1997,12 @@ Return value from boosted content if available."
(or (alist-get field (alist-get 'reblog toot))
(alist-get field toot)))
+(defun mastodon-tl--field-status (field toot)
+ "Return FIELD from TOOT.
+Return value from status field if available."
+ (or (alist-get field (alist-get 'status toot))
+ (alist-get field toot)))
+
(defun mastodon-tl--remove-html (toot)
"Remove unrendered tags from TOOT."
(let* ((t1 (replace-regexp-in-string "<\/p>" "\n\n" toot))