kopia lustrzana https://gitlab.com/jaywink/federation
Forgot to ensure ActivityPub support is always on. Release 0.18.1.
rodzic
ee1f2bb8a0
commit
e39896b958
|
@ -1,5 +1,11 @@
|
|||
# Changelog
|
||||
|
||||
## [0.18.1] - 2019-10-06
|
||||
|
||||
### Changed
|
||||
|
||||
* Removed possibility to deactivate ActivityPub support. It is now always enabled by default.
|
||||
|
||||
## [0.18.0] - 2019-10-06
|
||||
|
||||
### Added
|
||||
|
|
|
@ -63,7 +63,7 @@ master_doc = 'index'
|
|||
|
||||
# General information about the project.
|
||||
project = 'Federation'
|
||||
copyright = '2016-2017, Jason Robinson'
|
||||
copyright = '2016-2019, Jason Robinson'
|
||||
author = 'Jason Robinson'
|
||||
|
||||
# The version info for the project you're documenting, acts as replacement for
|
||||
|
|
|
@ -6,7 +6,7 @@ from federation.exceptions import NoSuitableProtocolFoundError
|
|||
if TYPE_CHECKING:
|
||||
from federation.types import RequestType
|
||||
|
||||
__version__ = "0.18.0"
|
||||
__version__ = "0.18.1"
|
||||
|
||||
PROTOCOLS = (
|
||||
"activitypub",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
from django.http import JsonResponse, HttpResponse, HttpResponseNotFound
|
||||
|
||||
from federation.utils.django import get_function_from_config, get_configuration
|
||||
from federation.utils.django import get_function_from_config
|
||||
|
||||
|
||||
def activitypub_object_view(func):
|
||||
|
@ -15,11 +15,6 @@ def activitypub_object_view(func):
|
|||
def inner(request, *args, **kwargs):
|
||||
|
||||
def get(request, *args, **kwargs):
|
||||
# TODO remove once AP support is more ready
|
||||
config = get_configuration()
|
||||
if not config.get("activitypub"):
|
||||
return func(request, *args, **kwargs)
|
||||
|
||||
fallback = True
|
||||
accept = request.META.get('HTTP_ACCEPT', '')
|
||||
for content_type in (
|
||||
|
|
|
@ -8,8 +8,6 @@ from jsonschema import validate
|
|||
from jsonschema.exceptions import ValidationError
|
||||
from xrd import XRD, Link, Element
|
||||
|
||||
from federation.utils.django import get_configuration
|
||||
|
||||
|
||||
def generate_host_meta(template=None, *args, **kwargs):
|
||||
"""Generate a host-meta XRD document.
|
||||
|
@ -391,22 +389,11 @@ class RFC7033Webfinger:
|
|||
],
|
||||
}
|
||||
|
||||
# TODO remove once AP support is more ready
|
||||
try:
|
||||
config = get_configuration()
|
||||
except ImportError:
|
||||
webfinger["links"].append({
|
||||
"rel": "self",
|
||||
"href": self.id,
|
||||
"type": "application/activity+json",
|
||||
})
|
||||
else:
|
||||
if config.get("activitypub"):
|
||||
webfinger["links"].append({
|
||||
"rel": "self",
|
||||
"href": self.id,
|
||||
"type": "application/activity+json",
|
||||
})
|
||||
webfinger["links"].append({
|
||||
"rel": "self",
|
||||
"href": self.id,
|
||||
"type": "application/activity+json",
|
||||
})
|
||||
|
||||
if self.atom_path:
|
||||
webfinger['links'].append(
|
||||
|
|
|
@ -10,6 +10,4 @@ FEDERATION = {
|
|||
"process_payload_function": "federation.tests.django.utils.process_payload",
|
||||
"search_path": "/search?q=",
|
||||
"tags_path": "/tag/:tag:/",
|
||||
# TODO remove once AP support is more ready
|
||||
"activitypub": True,
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue