forked from indymedia/epicyon
				
			Get actor for single user instance
							parent
							
								
									515305f005
								
							
						
					
					
						commit
						4bc0d11a7c
					
				
							
								
								
									
										8
									
								
								posts.py
								
								
								
								
							
							
						
						
									
										8
									
								
								posts.py
								
								
								
								
							|  | @ -119,13 +119,11 @@ def getUserUrl(wfRequest: {}) -> str: | ||||||
|         for link in wfRequest['links']: |         for link in wfRequest['links']: | ||||||
|             if link.get('type') and link.get('href'): |             if link.get('type') and link.get('href'): | ||||||
|                 if link['type'] == 'application/activity+json': |                 if link['type'] == 'application/activity+json': | ||||||
|                     if '/users/' in link['href'] or \ |                     if not ('/users/' in link['href'] or \ | ||||||
|                             '/profile/' in link['href'] or \ |                             '/profile/' in link['href'] or \ | ||||||
|                        '/channel/' in link['href']: |                             '/channel/' in link['href']): | ||||||
|  |                         print('Webfinger activity+json contains single user instance actor') | ||||||
|                     return link['href'] |                     return link['href'] | ||||||
|                     else: |  | ||||||
|                         print('Webfinger activity+json does not contain a valid actor') |  | ||||||
|                         print(link['href']) |  | ||||||
|     return None |     return None | ||||||
| 
 | 
 | ||||||
| def parseUserFeed(session,feedUrl: str,asHeader: {}, \ | def parseUserFeed(session,feedUrl: str,asHeader: {}, \ | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue