From acd38ce9f72b1f9a14da02bb1e57edd1c0da3ae7 Mon Sep 17 00:00:00 2001 From: Valentin Date: Sat, 24 Dec 2022 22:41:32 +0100 Subject: [PATCH] Fix algorithm reference --- relay/http_client.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/relay/http_client.py b/relay/http_client.py index 79ac8b9..57c0562 100644 --- a/relay/http_client.py +++ b/relay/http_client.py @@ -3,7 +3,7 @@ import traceback from aiohttp import ClientSession, ClientTimeout, TCPConnector from aiohttp.client_exceptions import ClientConnectorError, ServerTimeoutError -from aputils import Nodeinfo, WellKnownNodeinfo +from aputils import Nodeinfo, WellKnownNodeinfo, AlgorithmType from datetime import datetime from cachetools import LRUCache from json.decoder import JSONDecodeError @@ -141,10 +141,10 @@ class HttpClient: # Using the old algo by default is probably a better idea right now if (instance and instance.get('software') in {'mastodon'}) or (software and software in {'mastodon'}): - algorithm = 'hs2019' + algorithm = AlgorithmType.HS2019 else: - algorithm = 'original' + algorithm = AlgorithmType.ORIGINAL headers = {'Content-Type': 'application/activity+json'} headers.update(self.database.signer.sign_headers(