origin domain

merge-requests/30/head
Bob Mottram 2021-09-20 18:34:15 +01:00
parent 3761a3185e
commit d62223ca85
1 changed files with 4 additions and 4 deletions

View File

@ -292,7 +292,7 @@ def parseUserFeed(signingPrivateKeyPem: str,
def _getPersonBoxActor(session, baseDir: str, actor: str, def _getPersonBoxActor(session, baseDir: str, actor: str,
profileStr: str, asHeader: {}, profileStr: str, asHeader: {},
debug: bool, projectVersion: str, debug: bool, projectVersion: str,
httpPrefix: str, domain: str, httpPrefix: str, originDomain: str,
personCache: {}, personCache: {},
signingPrivateKeyPem: str, signingPrivateKeyPem: str,
sourceId: int) -> {}: sourceId: int) -> {}:
@ -308,14 +308,14 @@ def _getPersonBoxActor(session, baseDir: str, actor: str,
'Accept': 'application/ld+json; profile="' + profileStr + '"' 'Accept': 'application/ld+json; profile="' + profileStr + '"'
} }
personJson = getJson(signingPrivateKeyPem, session, actor, asHeader, None, personJson = getJson(signingPrivateKeyPem, session, actor, asHeader, None,
debug, projectVersion, httpPrefix, domain) debug, projectVersion, httpPrefix, originDomain)
if personJson: if personJson:
return personJson return personJson
asHeader = { asHeader = {
'Accept': 'application/ld+json; profile="' + profileStr + '"' 'Accept': 'application/ld+json; profile="' + profileStr + '"'
} }
personJson = getJson(signingPrivateKeyPem, session, actor, asHeader, None, personJson = getJson(signingPrivateKeyPem, session, actor, asHeader, None,
debug, projectVersion, httpPrefix, domain) debug, projectVersion, httpPrefix, originDomain)
if personJson: if personJson:
return personJson return personJson
print('Unable to get actor for ' + actor + ' ' + str(sourceId)) print('Unable to get actor for ' + actor + ' ' + str(sourceId))
@ -2551,7 +2551,7 @@ def sendSignedJson(postJsonObject: {}, session, baseDir: str,
postToBox = 'outbox' postToBox = 'outbox'
# get the actor inbox/outbox for the To handle # get the actor inbox/outbox for the To handle
originDomain = toDomain originDomain = domain
(inboxUrl, pubKeyId, pubKey, toPersonId, sharedInboxUrl, avatarUrl, (inboxUrl, pubKeyId, pubKey, toPersonId, sharedInboxUrl, avatarUrl,
displayName) = getPersonBox(signingPrivateKeyPem, displayName) = getPersonBox(signingPrivateKeyPem,
originDomain, originDomain,