Ryan Barrett 2023-01-17 11:16:14 -08:00
rodzic 1378ab4576
commit 5182bb92f3
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 6BE31FDF4776E9D4
2 zmienionych plików z 11 dodań i 0 usunięć

Wyświetl plik

@ -194,6 +194,9 @@ class WebmentionTest(testutil.TestCase):
}
self.as2_update = copy.deepcopy(self.as2_create)
self.as2_update['type'] = 'Update'
# we should generate this if it's not already in mf2 because Mastodon
# requires it for updates
self.as2_update['object']['updated'] = util.now().isoformat()
self.follow_html = """\
<html>
@ -292,6 +295,7 @@ class WebmentionTest(testutil.TestCase):
}
self.update_as2 = copy.deepcopy(self.create_as2)
self.update_as2['type'] = 'Update'
self.update_as2['object']['updated'] = util.now().isoformat()
self.not_fediverse = requests_response("""\
<html>

Wyświetl plik

@ -137,6 +137,13 @@ class Webmention(View):
if source_activity.get('type') == 'Create':
source_activity['type'] = 'Update'
# Mastodon requires the updated field for Updates, so
# generate it if it's not already there.
# https://docs.joinmastodon.org/spec/activitypub/#supported-activities-for-statuses
# https://socialhub.activitypub.rocks/t/what-could-be-the-reason-that-my-update-activity-does-not-work/2893/4
# https://github.com/mastodon/documentation/pull/1150
source_activity.get('object', {}).setdefault(
'updated', util.now().isoformat())
if self.source_obj.get('verb') == 'follow':
# prefer AS2 id or url, if available