forked from indymedia/epicyon
				
			Tidying
							parent
							
								
									bb31ce37cd
								
							
						
					
					
						commit
						ddaa94146f
					
				
							
								
								
									
										26
									
								
								posts.py
								
								
								
								
							
							
						
						
									
										26
									
								
								posts.py
								
								
								
								
							|  | @ -142,17 +142,21 @@ def cleanHtml(rawHtml: str) -> str: | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| def getUserUrl(wfRequest: {}) -> str: | def getUserUrl(wfRequest: {}) -> str: | ||||||
|     if wfRequest.get('links'): |     if not wfRequest.get('links'): | ||||||
|         for link in wfRequest['links']: |         return None | ||||||
|             if link.get('type') and link.get('href'): |     for link in wfRequest['links']: | ||||||
|                 if link['type'] == 'application/activity+json': |         if not (link.get('type') and link.get('href')): | ||||||
|                     if not ('/users/' in link['href'] or |             continue | ||||||
|                             '/accounts/' in link['href'] or |         if link['type'] != 'application/activity+json': | ||||||
|                             '/profile/' in link['href'] or |             continue | ||||||
|                             '/channel/' in link['href']): |         if not ('/users/' in link['href'] or | ||||||
|                         print('Webfinger activity+json contains ' + |                 '/accounts/' in link['href'] or | ||||||
|                               'single user instance actor') |                 '/profile/' in link['href'] or | ||||||
|                     return link['href'] |                 '/channel/' in link['href']): | ||||||
|  |             print('Webfinger activity+json ' + | ||||||
|  |                   'contains single user instance actor ' + | ||||||
|  |                   str(link)) | ||||||
|  |         return link['href'] | ||||||
|     return None |     return None | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue