Enable Webmentions for public posts
This commit is contained in:
@@ -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)
|
||||
|
@@ -40,7 +40,7 @@ def _discover_webmention_endoint(url: str) -> Optional[str]:
|
||||
return None
|
||||
|
||||
|
||||
def discover_webmention_endoint(url: str) -> Optional[str]:
|
||||
def discover_webmention_endpoint(url: str) -> Optional[str]:
|
||||
"""Discover the Webmention endpoint of a given URL, if any.
|
||||
|
||||
Passes all the tests at https://webmention.rocks!
|
||||
|
Reference in New Issue
Block a user