add synthetic id to outgoing AS2 activities

for #12
flask
Ryan Barrett 2021-03-10 20:37:28 -08:00
rodzic 670ece3fc6
commit f74a6d33fa
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 6BE31FDF4776E9D4
2 zmienionych plików z 5 dodań i 1 usunięć

Wyświetl plik

@ -327,6 +327,7 @@ class Handler(handlers.ModernHandler):
activity = {
'@context': as2.CONTEXT,
'type': 'Create',
'id': f'{activity["id"]}#bridgy-fed-create',
'object': activity,
}

Wyświetl plik

@ -158,6 +158,7 @@ class WebmentionTest(testutil.TestCase):
self.as2_create = {
'@context': 'https://www.w3.org/ns/activitystreams',
'type': 'Create',
'id': 'http://localhost/r/http://a/reply#bridgy-fed-create',
'object': {
'@context': 'https://www.w3.org/ns/activitystreams',
'type': 'Note',
@ -236,6 +237,7 @@ class WebmentionTest(testutil.TestCase):
self.create_as2 = {
'@context': 'https://www.w3.org/ns/activitystreams',
'type': 'Create',
'id': 'http://localhost/r/http://orig/post#bridgy-fed-create',
'object': {
'@context': 'https://www.w3.org/ns/activitystreams',
'type': 'Note',
@ -259,7 +261,8 @@ class WebmentionTest(testutil.TestCase):
<body>foo</body>
</html>
""", url='http://not/fediverse', content_type=CONTENT_TYPE_HTML)
self.activitypub_gets = [self.reply, self.not_fediverse, self.orig_as2, self.actor]
self.activitypub_gets = [self.reply, self.not_fediverse, self.orig_as2,
self.actor]
def verify_salmon(self, mock_post):
args, kwargs = mock_post.call_args