From 6f4c51e34f7d8c153b5b9a1954d007cd161cd90e Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Tue, 6 Aug 2024 10:17:40 +0200 Subject: add mastodon-tl--field-status --- lisp/mastodon-tl.el | 6 ++++++ 1 file changed, 6 insertions(+) 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)) -- cgit v1.2.3