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(