diff --git a/CHANGELOG.md b/CHANGELOG.md index f5cc8e3..778e471 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,8 @@ * The high level fetcher `retrieve_remote_content` now supports ActivityPub ID's. +* All ActivityPub payloads are added a `pyfed: https://docs.jasonrobinson.me/ns/python-federation` context to identify payloads sent by this library. + ### Changed * **Backwards incompatible.** Lowest compatible Python version is now 3.6. diff --git a/docs/protocols.rst b/docs/protocols.rst index 15851ba..f310e2a 100644 --- a/docs/protocols.rst +++ b/docs/protocols.rst @@ -41,7 +41,12 @@ Features currently supported: * Actor (Person) * Note, Article and Page (Create, Delete, Update) - * These become a `Post` or `Comment` depending on `inReplyTo`. + * These become a ``Post`` or ``Comment`` depending on ``inReplyTo``. * Attachment images from the above objects * Follow, Accept Follow, Undo Follow * Announce + +Namespace +......... + +All payloads over ActivityPub sent can be identified with by checking ``@context`` which will include the ``pyfed: https://docs.jasonrobinson.me/ns/python-federation`` namespace. diff --git a/federation/entities/activitypub/constants.py b/federation/entities/activitypub/constants.py index 2a585e5..11671ff 100644 --- a/federation/entities/activitypub/constants.py +++ b/federation/entities/activitypub/constants.py @@ -2,7 +2,7 @@ CONTEXT_ACTIVITYSTREAMS = "https://www.w3.org/ns/activitystreams" CONTEXT_HASHTAG = {"Hashtag": "as:Hashtag"} CONTEXT_LD_SIGNATURES = "https://w3id.org/security/v1" CONTEXT_MANUALLY_APPROVES_FOLLOWERS = {"manuallyApprovesFollowers": "as:manuallyApprovesFollowers"} -CONTEXT_PYTHON_FEDERATION = {"pyfed": "https://jasonrobinson.me/ns/federation"} +CONTEXT_PYTHON_FEDERATION = {"pyfed": "https://docs.jasonrobinson.me/ns/python-federation"} CONTEXT_SENSITIVE = {"sensitive": "as:sensitive"} CONTEXTS_DEFAULT = [