From db50128b9d4c5d39cbfce4aba955eed5691c49e4 Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 1 Jan 2025 14:49:10 -0500 Subject: [PATCH] FEP-67ff --- FEDERATION.md | 3 +++ catalog/common/jsondata.py | 2 +- common/models/index.py | 1 - docs/internals/federation.md | 19 +++++++++++++++---- 4 files changed, 19 insertions(+), 6 deletions(-) create mode 100644 FEDERATION.md diff --git a/FEDERATION.md b/FEDERATION.md new file mode 100644 index 00000000..8f93139f --- /dev/null +++ b/FEDERATION.md @@ -0,0 +1,3 @@ +# Federation + +see [doc](docs/internals/federation.md) for FEP-67ff related information. diff --git a/catalog/common/jsondata.py b/catalog/common/jsondata.py index 8287eeea..4765f9b3 100644 --- a/catalog/common/jsondata.py +++ b/catalog/common/jsondata.py @@ -313,7 +313,7 @@ class ArrayField(JSONFieldMixin, DJANGO_ArrayField): if isinstance(value, list): return value else: # backward compatible with dirty legacy data - logger.error(f"ArrayField has irregular value: {self.name}: {value}") + # logger.error(f"ArrayField has irregular value: {self.name}: {value}") return [value] return [] diff --git a/common/models/index.py b/common/models/index.py index 3e0a0e84..784a6e4c 100644 --- a/common/models/index.py +++ b/common/models/index.py @@ -51,7 +51,6 @@ class QueryParser: def is_valid(self): """Check if the parsed query is valid""" - print(self.page, self.max_pages, self.q, self.filter_by) return ( self.page > 0 and self.page <= self.max_pages diff --git a/docs/internals/federation.md b/docs/internals/federation.md index 58997f10..496019cb 100644 --- a/docs/internals/federation.md +++ b/docs/internals/federation.md @@ -1,12 +1,19 @@ # Federation -## ActivityPub +## Supported federation protocols and standards -NeoDB's ActivityPub implementation is based on [Takahē](https://jointakahe.org), with some change to enable interchange of additional information between NeoDB instances. +- [ActivityPub](https://www.w3.org/TR/activitypub/) (Server-to-Server) +- [WebFinger](https://webfinger.net/) +- [Http Signatures](https://datatracker.ietf.org/doc/html/draft-cavage-http-signatures) +- [NodeInfo](https://nodeinfo.diaspora.software/) -### NodeInfo +## Supported FEPs -NeoDB instances can be identified from user agent string (`NeoDB/x.x (+https://example.org)`) and its nodeinfo, e.g. https://neodb.social/nodeinfo/2.0/ : +- [FEP-f1d5: NodeInfo in Fediverse Software](https://codeberg.org/fediverse/fep/src/branch/main/fep/f1d5/fep-f1d5.md) + +## NodeInfo + +NeoDB instances can be identified from user agent string (`NeoDB/x.x (+https://example.org)`) and `protocols` in its nodeinfo, e.g. https://neodb.social/nodeinfo/2.0/ : ```json { "version": "2.0", @@ -21,6 +28,10 @@ NeoDB instances can be identified from user agent string (`NeoDB/x.x (+https://e ``` +## ActivityPub + +NeoDB's ActivityPub implementation is based on [Takahē](https://jointakahe.org), with some change to enable interchange of additional information between NeoDB instances. + ### Activity NeoDB add additional fields to `Note` activity: