diff sat/plugins/plugin_comp_ap_gateway/__init__.py @ 3846:cc13efdd8360

component AP gateway: return item when `item` URL is used: a request on an `item` type URL will return the suitable cached item. rel 370
author Goffi <goffi@goffi.org>
date Thu, 14 Jul 2022 12:55:30 +0200
parents 4f9d4650eab5
children aaa4e7815ba8
line wrap: on
line diff
--- a/sat/plugins/plugin_comp_ap_gateway/__init__.py	Thu Jul 14 12:55:30 2022 +0200
+++ b/sat/plugins/plugin_comp_ap_gateway/__init__.py	Thu Jul 14 12:55:30 2022 +0200
@@ -70,6 +70,7 @@
     TYPE_FOLLOWERS,
     TYPE_TOMBSTONE,
     TYPE_MENTION,
+    NS_AP,
     NS_AP_PUBLIC,
     PUBLIC_TUPLE
 )
@@ -822,7 +823,7 @@
         if activity_id is None:
             activity_id = f"{actor_id}#{activity.lower()}_{shortuuid.uuid()}"
         data: Dict[str, Any] = {
-            "@context": "https://www.w3.org/ns/activitystreams",
+            "@context": NS_AP,
             "actor": actor_id,
             "id": activity_id,
             "type": activity,