normalize Pleroman posts without cws (fix #3)

This commit is contained in:
io 2021-09-27 11:13:03 +00:00
parent 4492f6685c
commit 94949289f0

View file

@ -144,7 +144,9 @@ class PostFetcher:
""",
(
obj['id'],
obj['summary'],
# Pleroma returns an empty string here for posts without a CW,
# which is semantically incorrect IMO
obj['summary'] or None,
extract_post_content(obj['content']),
pendulum.parse(obj['published']).astimezone(pendulum.timezone('UTC')).timestamp(),
),