log_data bug fixes

pull/684/head
Ryan Barrett 2023-10-14 14:13:13 -07:00
rodzic f3039fc87a
commit 441c5aa29f
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 6BE31FDF4776E9D4
3 zmienionych plików z 3 dodań i 2 usunięć

Wyświetl plik

@ -206,7 +206,7 @@ class ActivityPub(User, Protocol):
elif not activity.get('actor'):
logger.warning('Outgoing AP activity has no actor!')
return signed_post(url, log_data=True, data=activity).ok
return signed_post(url, log_data=log_data, data=activity).ok
@classmethod
def fetch(cls, obj, **kwargs):

Wyświetl plik

@ -833,7 +833,6 @@ class Protocol:
)
logger.info(f'Delivering to: {obj.undelivered}')
log_data = True
errors = [] # stores (target URL, code, body) tuples
# deliver to all targets, in parallel, with a thread pool

2
web.py
Wyświetl plik

@ -445,11 +445,13 @@ class Web(User, Protocol):
else:
logger.debug(f'Not hydrating actor or author due to source_protocol {obj.source_protocol}')
util.d(obj_as1)
html = microformats2.activities_to_html([obj_as1])
# add HTML meta redirect to source page. should trigger for end users in
# browsers but not for webmention receivers (hopefully).
url = util.get_url(obj_as1)
util.d(url)
if url:
utf8 = '<meta charset="utf-8">'
refresh = f'<meta http-equiv="refresh" content="0;url={url}">'