branch: elpa/mastodon
commit cd4c5a8677916c3032186f58858a4b6ea7667fb3
Author: marty hiatt <[email protected]>
Commit: marty hiatt <[email protected]>
add suspended check to tl--toot, no display if so. #753.
A user is getting errors in bookmarks view because they bookmarked a toot
by a user that was then suspended. I think the server should not send us
such data, as suspension means a user's toots disappear (though they're
not deleted for 30 days). but whatever, the server is doing so, so we need
to try to handle the situation gracefully.
---
lisp/mastodon-tl.el | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index 87b6f5a5bb..5452415e70 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -2073,9 +2073,16 @@ CW-EXPANDED means treat content warnings as unfolded."
(if (mastodon-tl--has-spoiler toot)
(mastodon-tl--spoiler toot)
(mastodon-tl--content toot)))))
- ;; If any filters are "hide", then we hide,
- ;; even though item may also have a "warn" filter:
- (unless (and filtered (assoc "hide" filters)) ;; no insert
+ (unless (or
+ ;; If any filters are "hide", then we hide,
+ ;; even though item may also have a "warn" filter:
+ (and filtered (assoc "hide" filters)) ;; no insert
+ ;; if account suspended, no-op:
+ ;; https://codeberg.org/martianh/mastodon.el/issues/753
+ ;; a user found post in bookmarks from a suspended user,
+ ;; breaking loading of bookmarks, even though I suspect the
+ ;; server should not even send us such data:
+ (map-nested-elt toot '(account suspended)))
(mastodon-tl--insert-status
toot (mastodon-tl--clean-tabs-and-nl spoiler-or-content)
detailed-p thread domain unfolded no-byline cw-expanded))))