Handle domain

master
Bob Mottram 2019-07-13 20:34:03 +01:00
parent d2fcb37dd9
commit 08a16714c0
1 changed files with 69 additions and 69 deletions

View File

@ -309,9 +309,9 @@ class PubServer(BaseHTTPRequestHandler):
# There are no replies, so show empty collection # There are no replies, so show empty collection
repliesJson = { repliesJson = {
'@context': 'https://www.w3.org/ns/activitystreams', '@context': 'https://www.w3.org/ns/activitystreams',
'first': self.server.httpPrefix+'://'+self.server.domain+'/users/'+nickname+'/statuses/'+statusNumber+'?page=true', 'first': self.server.httpPrefix+'://'+domainFull+'/users/'+nickname+'/statuses/'+statusNumber+'?page=true',
'id': self.server.httpPrefix+'://'+self.server.domain+'/users/'+nickname+'/statuses/'+statusNumber, 'id': self.server.httpPrefix+'://'+domainFull+'/users/'+nickname+'/statuses/'+statusNumber,
'last': self.server.httpPrefix+'://'+self.server.domain+'/users/'+nickname+'/statuses/'+statusNumber+'?page=true', 'last': self.server.httpPrefix+'://'+domainFull+'/users/'+nickname+'/statuses/'+statusNumber+'?page=true',
'totalItems': 0, 'totalItems': 0,
'type': 'OrderedCollection'} 'type': 'OrderedCollection'}
self._set_headers('application/json') self._set_headers('application/json')
@ -322,10 +322,10 @@ class PubServer(BaseHTTPRequestHandler):
# replies exist. Itterate through the text file containing message ids # replies exist. Itterate through the text file containing message ids
repliesJson = { repliesJson = {
'@context': 'https://www.w3.org/ns/activitystreams', '@context': 'https://www.w3.org/ns/activitystreams',
'id': self.server.httpPrefix+'://'+self.server.domain+'/users/'+nickname+'/statuses/'+statusNumber+'?page=true', 'id': self.server.httpPrefix+'://'+domainFull+'/users/'+nickname+'/statuses/'+statusNumber+'?page=true',
'orderedItems': [ 'orderedItems': [
], ],
'partOf': self.server.httpPrefix+'://'+self.server.domain+'/users/'+nickname+'/statuses/'+statusNumber, 'partOf': self.server.httpPrefix+'://'+domainFull+'/users/'+nickname+'/statuses/'+statusNumber,
'type': 'OrderedCollectionPage'} 'type': 'OrderedCollectionPage'}
# some messages could be private, so check authorization state # some messages could be private, so check authorization state
authorized=self._isAuthorized() authorized=self._isAuthorized()