page ending

master
Bob Mottram 2019-07-13 21:23:42 +01:00
parent ce9f403f92
commit 7ed36fa9d5
1 changed files with 4 additions and 4 deletions

View File

@ -286,7 +286,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.GETbusy=False self.server.GETbusy=False
return return
# get replies to a post /users/nickname/statuses/number/replies # get replies to a post /users/nickname/statuses/number/replies
if self.path.endswith('/replies'): if self.path.endswith('/replies') or '/replies?page=' in self.path:
if '/statuses/' in self.path and '/users/' in self.path: if '/statuses/' in self.path and '/users/' in self.path:
namedStatus=self.path.split('/users/')[1] namedStatus=self.path.split('/users/')[1]
if '/' in namedStatus: if '/' in namedStatus:
@ -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+'://'+domainFull+'/users/'+nickname+'/statuses/'+statusNumber+'?page=true', 'first': self.server.httpPrefix+'://'+domainFull+'/users/'+nickname+'/statuses/'+statusNumber+'/replies?page=true',
'id': self.server.httpPrefix+'://'+domainFull+'/users/'+nickname+'/statuses/'+statusNumber, 'id': self.server.httpPrefix+'://'+domainFull+'/users/'+nickname+'/statuses/'+statusNumber+'/replies',
'last': self.server.httpPrefix+'://'+domainFull+'/users/'+nickname+'/statuses/'+statusNumber+'?page=true', 'last': self.server.httpPrefix+'://'+domainFull+'/users/'+nickname+'/statuses/'+statusNumber+'/replies?page=true',
'totalItems': 0, 'totalItems': 0,
'type': 'OrderedCollection'} 'type': 'OrderedCollection'}
self._set_headers('application/json') self._set_headers('application/json')