forked from indymedia/epicyon
self
parent
d0f7ba2a53
commit
359e4794c9
|
@ -102,7 +102,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def _postToOutbox(messageJson: {}) -> bool:
|
def _postToOutbox(self,messageJson: {}) -> bool:
|
||||||
"""post is received by the outbox
|
"""post is received by the outbox
|
||||||
Client to server message post
|
Client to server message post
|
||||||
https://www.w3.org/TR/activitypub/#client-to-server-outbox-delivery
|
https://www.w3.org/TR/activitypub/#client-to-server-outbox-delivery
|
||||||
|
@ -144,7 +144,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
savePostToBox(self.server.baseDir,postId,self.postToNickname,self.server.domain,messageJson,'outbox')
|
savePostToBox(self.server.baseDir,postId,self.postToNickname,self.server.domain,messageJson,'outbox')
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def _updateInboxQueue(nickname: str,messageJson: {}) -> bool:
|
def _updateInboxQueue(self,nickname: str,messageJson: {}) -> bool:
|
||||||
"""Update the inbox queue
|
"""Update the inbox queue
|
||||||
"""
|
"""
|
||||||
cacheFilename = \
|
cacheFilename = \
|
||||||
|
@ -404,7 +404,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
else:
|
else:
|
||||||
self.postToNickname=pathUsersSection.split('/')[0]
|
self.postToNickname=pathUsersSection.split('/')[0]
|
||||||
if self.postToNickname:
|
if self.postToNickname:
|
||||||
if _updateInboxQueue(self.postToNickname,messageJson):
|
if self._updateInboxQueue(self.postToNickname,messageJson):
|
||||||
return
|
return
|
||||||
self.send_response(403)
|
self.send_response(403)
|
||||||
self.end_headers()
|
self.end_headers()
|
||||||
|
@ -413,7 +413,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
else:
|
else:
|
||||||
if self.path == '/sharedInbox':
|
if self.path == '/sharedInbox':
|
||||||
print('DEBUG: POST to shared inbox')
|
print('DEBUG: POST to shared inbox')
|
||||||
if _updateInboxQueue('sharedinbox',messageJson):
|
if self._updateInboxQueue('sharedinbox',messageJson):
|
||||||
return
|
return
|
||||||
self.send_response(200)
|
self.send_response(200)
|
||||||
self.end_headers()
|
self.end_headers()
|
||||||
|
|
Loading…
Reference in New Issue