forked from forks/microblog.pub
Allow to disable webmentions via config
This commit is contained in:
parent
018b7bf553
commit
a0a756d320
3 changed files with 10 additions and 3 deletions
|
@ -36,12 +36,13 @@
|
||||||
- with dark and light version
|
- with dark and light version
|
||||||
- IndieWeb citizen
|
- IndieWeb citizen
|
||||||
- Microformats aware (exports `h-feed`, `h-entry`, `h-cards`, ...)
|
- Microformats aware (exports `h-feed`, `h-entry`, `h-cards`, ...)
|
||||||
- Exports RSS/Atom/[JSON](https://jsonfeed.org/) feeds
|
|
||||||
- You stream/timeline is also available in an (authenticated) JSON feed
|
|
||||||
- Implements [IndieAuth](https://indieauth.spec.indieweb.org/) endpoints (authorization and token endpoint)
|
- Implements [IndieAuth](https://indieauth.spec.indieweb.org/) endpoints (authorization and token endpoint)
|
||||||
- U2F support
|
- U2F support
|
||||||
- You can use your ActivityPub identity to login to other websites/app
|
- You can use your ActivityPub identity to login to other websites/app
|
||||||
- Comes with a tiny HTTP API to help posting new content and and read your inbox/notifications
|
- Send [Webmentions](https://www.w3.org/TR/webmention/) (only for public notes)
|
||||||
|
- Exports RSS/Atom/[JSON](https://jsonfeed.org/) feeds
|
||||||
|
- You stream/timeline is also available in an (authenticated) JSON feed
|
||||||
|
- Comes with a tiny HTTP API to help posting new content and and read your inbox/notifications
|
||||||
- Deployable with Docker (Docker compose for everything: dev, test and deployment)
|
- Deployable with Docker (Docker compose for everything: dev, test and deployment)
|
||||||
- Focused on testing
|
- Focused on testing
|
||||||
- Tested against the [official ActivityPub test suite](https://test.activitypub.rocks/), see [the results](https://activitypub.rocks/implementation-report/)
|
- Tested against the [official ActivityPub test suite](https://test.activitypub.rocks/), see [the results](https://activitypub.rocks/implementation-report/)
|
||||||
|
|
|
@ -173,6 +173,8 @@ if conf.get("emoji_tpl"):
|
||||||
# Hosts blacklist
|
# Hosts blacklist
|
||||||
BLACKLIST = conf.get("blacklist", [])
|
BLACKLIST = conf.get("blacklist", [])
|
||||||
|
|
||||||
|
DISABLE_WEBMENTIONS = conf.get("disable_webmentions", False)
|
||||||
|
|
||||||
# By default, we keep 14 of inbox data ; outbox is kept forever (along with bookmarked stuff, outbox replies, liked...)
|
# By default, we keep 14 of inbox data ; outbox is kept forever (along with bookmarked stuff, outbox replies, liked...)
|
||||||
DAYS_TO_KEEP = 14
|
DAYS_TO_KEEP = 14
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,7 @@ from little_boxes import activitypub as ap
|
||||||
from poussetaches import PousseTaches
|
from poussetaches import PousseTaches
|
||||||
|
|
||||||
from config import MEDIA_CACHE
|
from config import MEDIA_CACHE
|
||||||
|
from config import DISABLE_WEBMENTIONS
|
||||||
from utils import parse_datetime
|
from utils import parse_datetime
|
||||||
|
|
||||||
p = PousseTaches(
|
p = PousseTaches(
|
||||||
|
@ -43,6 +44,9 @@ class Tasks:
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def send_webmentions(activity: ap.Create, links: Set[str]) -> None:
|
def send_webmentions(activity: ap.Create, links: Set[str]) -> None:
|
||||||
|
if DISABLE_WEBMENTIONS:
|
||||||
|
return None
|
||||||
|
|
||||||
for link in links:
|
for link in links:
|
||||||
p.push(
|
p.push(
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue