kopia lustrzana https://gitlab.com/jaywink/federation
Fix calling pre_send
rodzic
f7f7d55ad8
commit
9ef0fd4547
|
@ -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
|
||||
|
||||
|
|
|
@ -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"),
|
||||
|
|
Ładowanie…
Reference in New Issue