Fix calling pre_send

merge-requests/155/head
Jason Robinson 2019-08-18 03:20:35 +03:00
rodzic f7f7d55ad8
commit 9ef0fd4547
2 zmienionych plików z 2 dodań i 3 usunięć

Wyświetl plik

@ -201,8 +201,7 @@ def get_outbound_entity(entity: BaseEntity, private_key):
# # in all situations but is apparently being removed.
# # TODO: remove this once Diaspora removes the extra signature
# outbound.parent_signature = outbound.signature
if getattr(outbound, "pre_send", None) and isinstance(getattr(outbound, "pre_send"), callable):
# noinspection PyUnresolvedReferences
if hasattr(outbound, "pre_send"):
outbound.pre_send()
return outbound

Wyświetl plik

@ -153,7 +153,7 @@ def handle_send(
payload["object"]["to"] = [fid]
payload = json.dumps(payload).encode("utf-8")
except Exception as ex:
logger.error("handle_send - failed to generate private payload for %s: %s", fid, ex)
logger.error("handle_send - failed to generate payload for %s, %s: %s", fid, endpoint, ex)
continue
payloads.append({
"auth": get_http_authentication(author_user.private_key, f"{author_user.id}#main-key"),