forked from indymedia/epicyon
				
			To not within object
							parent
							
								
									3bb0ef5b27
								
							
						
					
					
						commit
						da3e798d95
					
				
							
								
								
									
										16
									
								
								bookmarks.py
								
								
								
								
							
							
						
						
									
										16
									
								
								bookmarks.py
								
								
								
								
							|  | @ -583,13 +583,13 @@ def outboxBookmark(baseDir: str,httpPrefix: str, \ | ||||||
|         if debug: |         if debug: | ||||||
|             print('DEBUG: bookmark object is not string') |             print('DEBUG: bookmark object is not string') | ||||||
|         return |         return | ||||||
|     if messageJson['object'].get('to'): |     if messageJson.get('to'): | ||||||
|         if not isinstance(messageJson['object']['to'], list): |         if not isinstance(messageJson['to'], list): | ||||||
|             return |             return | ||||||
|         if len(messageJson['object']['to'])!=1: |         if len(messageJson['to'])!=1: | ||||||
|             print('WARN: Bookmark should only be sent to one recipient') |             print('WARN: Bookmark should only be sent to one recipient') | ||||||
|             return |             return | ||||||
|         if messageJson['object']['to'][0]!=messageJson['actor']: |         if messageJson['to'][0]!=messageJson['actor']: | ||||||
|             print('WARN: Bookmark should be addressed to the same actor') |             print('WARN: Bookmark should be addressed to the same actor') | ||||||
|             return             |             return             | ||||||
|     if debug: |     if debug: | ||||||
|  | @ -640,13 +640,13 @@ def outboxUndoBookmark(baseDir: str,httpPrefix: str, \ | ||||||
|         if debug: |         if debug: | ||||||
|             print('DEBUG: undo bookmark object is not string') |             print('DEBUG: undo bookmark object is not string') | ||||||
|         return |         return | ||||||
|     if messageJson['object'].get('to'): |     if messageJson.get('to'): | ||||||
|         if not isinstance(messageJson['object']['to'], list): |         if not isinstance(messageJson['to'], list): | ||||||
|             return |             return | ||||||
|         if len(messageJson['object']['to'])!=1: |         if len(messageJson['to'])!=1: | ||||||
|             print('WARN: Bookmark should only be sent to one recipient') |             print('WARN: Bookmark should only be sent to one recipient') | ||||||
|             return |             return | ||||||
|         if messageJson['object']['to'][0]!=messageJson['actor']: |         if messageJson['to'][0]!=messageJson['actor']: | ||||||
|             print('WARN: Bookmark should be addressed to the same actor') |             print('WARN: Bookmark should be addressed to the same actor') | ||||||
|             return             |             return             | ||||||
|     if debug: |     if debug: | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue