mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-10-31 14:22:25 -05:00 
			
		
		
		
	Faves (#31)
* start on federating faves * outbound federation of likes working
This commit is contained in:
		
					parent
					
						
							
								2dbd132e50
							
						
					
				
			
			
				commit
				
					
						e670c32a91
					
				
			
		
					 12 changed files with 250 additions and 47 deletions
				
			
		|  | @ -85,13 +85,18 @@ var ( | |||
| 	// followingPathRegex parses a path that validates and captures the username part from eg /users/example_username/following | ||||
| 	followingPathRegex = regexp.MustCompile(followingPathRegexString) | ||||
| 
 | ||||
| 	likedPathRegexString = fmt.Sprintf(`^/?%s/%s/%s$`, UsersPath, usernameRegexString, LikedPath) | ||||
| 	// followingPathRegex parses a path that validates and captures the username part from eg /users/example_username/liked | ||||
| 	likedPathRegex = regexp.MustCompile(likedPathRegexString) | ||||
| 
 | ||||
| 	// see https://ihateregex.io/expr/uuid/ | ||||
| 	uuidRegexString = `[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}` | ||||
| 
 | ||||
| 	likedPathRegexString = fmt.Sprintf(`^/?%s/(%s)/%s$`, UsersPath, usernameRegexString, LikedPath) | ||||
| 	// likedPathRegex parses a path that validates and captures the username part from eg /users/example_username/liked | ||||
| 	likedPathRegex = regexp.MustCompile(likedPathRegexString) | ||||
| 
 | ||||
| 	likePathRegexString = fmt.Sprintf(`^/?%s/(%s)/%s/(%s)$`, UsersPath, usernameRegexString, LikedPath, uuidRegexString) | ||||
| 	// likePathRegex parses a path that validates and captures the username part and the uuid part | ||||
| 	// from eg /users/example_username/liked/123e4567-e89b-12d3-a456-426655440000. | ||||
| 	likePathRegex = regexp.MustCompile(likePathRegexString) | ||||
| 
 | ||||
| 	statusesPathRegexString = fmt.Sprintf(`^/?%s/(%s)/%s/(%s)$`, UsersPath, usernameRegexString, StatusesPath, uuidRegexString) | ||||
| 	// statusesPathRegex parses a path that validates and captures the username part and the uuid part | ||||
| 	// from eg /users/example_username/statuses/123e4567-e89b-12d3-a456-426655440000. | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue