diff --git a/journal/models/collection.py b/journal/models/collection.py index 9e209c3b..4018ce09 100644 --- a/journal/models/collection.py +++ b/journal/models/collection.py @@ -52,7 +52,7 @@ class Collection(List): return html @property - def plain_description(self): + def plain_content(self): html = render_md(self.brief) return _RE_HTML_TAG.sub(" ", html) diff --git a/takahe/utils.py b/takahe/utils.py index 5c4ae8d8..4e948462 100644 --- a/takahe/utils.py +++ b/takahe/utils.py @@ -549,7 +549,9 @@ class Takahe: category = "收藏单" item_link = collection.absolute_url pre_conetent = f'{action_label}{category}《{collection.title}》
' - content = "" + content = collection.plain_content + if len(content) > 360: + content = content[:357] + "..." data = { "object": { # "tag": [item.ap_object_ref for item in collection.items],