mirror of
https://git.pleroma.social/pleroma/relay.git
synced 2024-11-21 22:17:59 +00:00
update aputils
This commit is contained in:
parent
1a7abb4ecb
commit
d172439fac
|
@ -87,7 +87,7 @@ class HttpClient:
|
|||
headers = {}
|
||||
|
||||
if sign_headers:
|
||||
headers.update(self.database.signer.sign_headers('GET', url))
|
||||
headers.update(self.database.signer.sign_headers('GET', url, algorithm='original'))
|
||||
|
||||
try:
|
||||
logging.verbose(f'Fetching resource: {url}')
|
||||
|
@ -142,11 +142,11 @@ class HttpClient:
|
|||
instance = self.database.get_inbox(url)
|
||||
|
||||
## Using the old algo by default is probably a better idea right now
|
||||
if instance and instance.get('software') not in {'mastodon'}:
|
||||
algorithm = aputils.Algorithm.RSASHA256
|
||||
if instance and instance.get('software') in {'mastodon'}:
|
||||
algorithm = 'hs2019'
|
||||
|
||||
else:
|
||||
algorithm = aputils.Algorithm.HS2019
|
||||
algorithm = 'original'
|
||||
|
||||
headers = {'Content-Type': 'application/activity+json'}
|
||||
headers.update(self.database.signer.sign_headers('POST', url, message, algorithm=algorithm))
|
||||
|
|
|
@ -23,7 +23,7 @@ async def handle_relay(request):
|
|||
cache[request.message.objectid] = message.id
|
||||
logging.debug(f'>> relay: {message}')
|
||||
|
||||
niboxes = request.database.distill_inboxes(request.message)
|
||||
inboxes = request.database.distill_inboxes(request.message)
|
||||
|
||||
for inbox in inboxes:
|
||||
request.app.push_message(inbox, message)
|
||||
|
|
|
@ -28,7 +28,7 @@ install_requires =
|
|||
click >= 8.1.2
|
||||
pycryptodome >= 3.14.1
|
||||
PyYAML >= 5.0.0
|
||||
aputils @ https://git.barkshark.xyz/barkshark/aputils/archive/0.1.1.tar.gz
|
||||
aputils @ https://git.barkshark.xyz/barkshark/aputils/archive/0.1.2.tar.gz
|
||||
python_requires = >=3.6
|
||||
|
||||
[options.extras_require]
|
||||
|
|
Loading…
Reference in a new issue