even more AS2-isms for ActivityPub interop with Mastodon

pull/27/head
Ryan Barrett 2017-09-24 16:50:24 -07:00
rodzic 53cf61c980
commit 601bfde5c7
2 zmienionych plików z 6 dodań i 2 usunięć

Wyświetl plik

@ -96,10 +96,11 @@ class WebmentionTest(testutil.TestCase):
self.assertEqual(('https://foo.com/inbox',), args)
self.assertEqual({
'@context': 'https://www.w3.org/ns/activitystreams',
'@type': 'Create',
'type': 'Create',
'object': {
'@type': 'Note',
'type': 'Note',
'objectType': 'comment',
'url': 'http://a/reply',
'displayName': 'foo ☕ bar',
'content': ' <a class="u-in-reply-to" href="http://orig/post">foo ☕ bar</a> ',

Wyświetl plik

@ -95,10 +95,13 @@ class WebmentionHandler(webapp2.RequestHandler):
source_obj['inReplyTo'],
])
source_obj.update({
'type': 'Note'
'@type': 'Note',
'type': 'Note',
})
del source_obj['objectType']
source_activity = {
'@context': 'https://www.w3.org/ns/activitystreams',
'@type': 'Create',
'type': 'Create',
'object': source_obj,
}