Enable Webmentions for public posts

This commit is contained in:
Thomas Sileo
2019-09-08 12:09:34 +02:00
parent 4d968264f2
commit 018b7bf553
7 changed files with 65 additions and 7 deletions

View File

@@ -1,5 +1,3 @@
import json
import little_boxes.activitypub as ap
import mf2py
import requests
@@ -49,7 +47,7 @@ def lookup(url: str) -> ap.BaseActivity:
# Maybe the page was JSON-LD?
data = resp.json()
return ap.parse_activity(data)
except json.JSONDecodeError:
except Exception:
pass
# Try content negotiation (retry with the AP Accept header)