diff --git a/daemon.py b/daemon.py index 9e4f1d5f..9d9b5a82 100644 --- a/daemon.py +++ b/daemon.py @@ -751,7 +751,7 @@ class PubServer(BaseHTTPRequestHandler): elif (callingDomain.endswith('.i2p') and self.server.i2pDomain): wfResult = \ - webfingerMeta('i2p', self.server.i2pDomain) + webfingerMeta('http', self.server.i2pDomain) else: wfResult = \ webfingerMeta(self.server.httpPrefix, @@ -772,7 +772,7 @@ class PubServer(BaseHTTPRequestHandler): elif (callingDomain.endswith('.i2p') and self.server.i2pDomain): wfResult = \ - webfingerNodeInfo('i2p', self.server.i2pDomain) + webfingerNodeInfo('http', self.server.i2pDomain) else: wfResult = \ webfingerNodeInfo(self.server.httpPrefix, @@ -1576,7 +1576,7 @@ class PubServer(BaseHTTPRequestHandler): self.server.onionDomain) elif (callingDomain.endswith('.i2p') and self.server.i2pDomain): - msg = htmlTermsOfService(self.server.baseDir, 'i2p', + msg = htmlTermsOfService(self.server.baseDir, 'http', self.server.i2pDomain) else: msg = htmlTermsOfService(self.server.baseDir, @@ -1614,7 +1614,7 @@ class PubServer(BaseHTTPRequestHandler): None) elif callingDomain.endswith('.i2p'): msg = \ - htmlAbout(self.server.baseDir, 'i2p', + htmlAbout(self.server.baseDir, 'http', self.server.i2pDomain, None) else: diff --git a/posts.py b/posts.py index bdac26f1..4ef32512 100644 --- a/posts.py +++ b/posts.py @@ -1651,10 +1651,8 @@ def sendSignedJson(postJsonObject: {}, session, baseDir: str, return 8 withDigest = True - if toDomain.endswith('.onion'): + if toDomain.endswith('.onion') or toDomain.endswith('.i2p'): httpPrefix = 'http' - elif toDomain.endswith('.i2p'): - httpPrefix = 'i2p' # sharedInbox = False if toNickname == 'inbox': @@ -1965,7 +1963,7 @@ def sendToNamedAddresses(session, baseDir: str, elif i2pDomain: if toDomain.endswith('.i2p'): fromDomain = i2pDomain - fromHttpPrefix = 'i2p' + fromHttpPrefix = 'http' cc = [] sendSignedJson(postJsonObject, session, baseDir, nickname, fromDomain, port, @@ -2054,7 +2052,7 @@ def sendToFollowers(session, baseDir: str, elif i2pDomain: if toDomain.endswith('.i2p'): fromDomain = i2pDomain - fromHttpPrefix = 'i2p' + fromHttpPrefix = 'http' if withSharedInbox: toNickname = followerHandles[index].split('@')[0]