mirror of https://gitlab.com/bashrc2/epicyon
				
				
				
			Save blog posts to their own box
							parent
							
								
									7c37ffcd36
								
							
						
					
					
						commit
						ac3de67ddd
					
				|  | @ -4073,7 +4073,7 @@ class PubServer(BaseHTTPRequestHandler): | |||
|         # remove any trailing slashes from the path | ||||
|         if not self.path.endswith('confirm'): | ||||
|             self.path= \ | ||||
|                 self.path.replace('/outbox/','/outbox').replace('/inbox/','/inbox').replace('/shares/','/shares').replace('/sharedInbox/','/sharedInbox') | ||||
|                 self.path.replace('/outbox/','/outbox').replace('/tlblogs/','/tlblogs').replace('/inbox/','/inbox').replace('/shares/','/shares').replace('/sharedInbox/','/sharedInbox') | ||||
| 
 | ||||
|         if self.path=='/inbox': | ||||
|             if not self.server.enableSharedInbox: | ||||
|  | @ -4093,7 +4093,7 @@ class PubServer(BaseHTTPRequestHandler): | |||
|                 print('POST Not authorized') | ||||
|                 print(str(self.headers)) | ||||
| 
 | ||||
|         # if this is a POST to teh outbox then check authentication | ||||
|         # if this is a POST to the outbox then check authentication | ||||
|         self.outboxAuthenticated=False | ||||
|         self.postToNickname=None | ||||
| 
 | ||||
|  |  | |||
							
								
								
									
										10
									
								
								outbox.py
								
								
								
								
							
							
						
						
									
										10
									
								
								outbox.py
								
								
								
								
							|  | @ -158,8 +158,14 @@ def postMessageToOutbox(messageJson: {},postToNickname: str, \ | |||
|         print('DEBUG: savePostToBox') | ||||
|     if messageJson['type']!='Upgrade': | ||||
|         outboxName='outbox' | ||||
|         if messageJson['type']=='Article': | ||||
|             outboxName='tlblogs' | ||||
| 
 | ||||
|         # if this is a blog post then save to its own box | ||||
|         if messageJson['type']=='Create': | ||||
|             if messageJson.get('object'): | ||||
|                 if isinstance(messageJson['object'], dict): | ||||
|                     if messageJson['object'].get('type'): | ||||
|                         if messageJson['object']['type']=='Article': | ||||
|                             outboxName='tlblogs' | ||||
|          | ||||
|         savedFilename= \ | ||||
|             savePostToBox(baseDir, \ | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue