Bugfixes by @cwt (#42)
* check for missing actor in stream item * reply on my own status * fix img exceed div * check for "actor" key in item.meta before render * force UTF-8 text encoding * check if a is a dict or string * check d object must be dict to get url or id * json/atom/rss feed * handle missing root_id * fix newer-link hover * fix older-link position * quick hack to support peertube video * enable IndieAuth endpoint * fix 500 when remote follow
This commit is contained in:
@@ -523,8 +523,8 @@ def gen_feed():
|
||||
fg.logo(ME.get("icon", {}).get("url"))
|
||||
fg.language("en")
|
||||
for item in DB.activities.find(
|
||||
{"box": Box.OUTBOX.value, "type": "Create"}, limit=50
|
||||
):
|
||||
{"box": Box.OUTBOX.value, "type": "Create", "meta.deleted": False}, limit=10
|
||||
).sort("_id", -1):
|
||||
fe = fg.add_entry()
|
||||
fe.id(item["activity"]["object"].get("url"))
|
||||
fe.link(href=item["activity"]["object"].get("url"))
|
||||
@@ -537,11 +537,11 @@ def json_feed(path: str) -> Dict[str, Any]:
|
||||
"""JSON Feed (https://jsonfeed.org/) document."""
|
||||
data = []
|
||||
for item in DB.activities.find(
|
||||
{"box": Box.OUTBOX.value, "type": "Create"}, limit=50
|
||||
):
|
||||
{"box": Box.OUTBOX.value, "type": "Create", "meta.deleted": False}, limit=10
|
||||
).sort("_id", -1):
|
||||
data.append(
|
||||
{
|
||||
"id": item["id"],
|
||||
"id": item["activity"]["id"],
|
||||
"url": item["activity"]["object"].get("url"),
|
||||
"content_html": item["activity"]["object"]["content"],
|
||||
"content_text": html2text(item["activity"]["object"]["content"]),
|
||||
|
Reference in New Issue
Block a user