Refactor
This commit is contained in:
		
							parent
							
								
									7b0f93464a
								
							
						
					
					
						commit
						c051779d34
					
				
					 1 changed files with 8 additions and 6 deletions
				
			
		| 
						 | 
					@ -293,17 +293,19 @@ export const packForAp = (
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (!_user) return reject('invalid user arg.');
 | 
						if (!_user) return reject('invalid user arg.');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						const userUrl = `${config.url}/${_user.username}`;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	resolve({
 | 
						resolve({
 | 
				
			||||||
		"@context": ["https://www.w3.org/ns/activitystreams", {
 | 
							"@context": ["https://www.w3.org/ns/activitystreams", {
 | 
				
			||||||
			"@language": "ja"
 | 
								"@language": "ja"
 | 
				
			||||||
		}],
 | 
							}],
 | 
				
			||||||
		"type": "Person",
 | 
							"type": "Person",
 | 
				
			||||||
		"id": `${config.url}/${_user.username}`,
 | 
							"id": userUrl,
 | 
				
			||||||
		"following": `${config.url}/${_user.username}/following.json`,
 | 
							"following": `${userUrl}/following.json`,
 | 
				
			||||||
		"followers": `${config.url}/${_user.username}/followers.json`,
 | 
							"followers": `${userUrl}/followers.json`,
 | 
				
			||||||
		"liked": `${config.url}/${_user.username}/liked.json`,
 | 
							"liked": `${userUrl}/liked.json`,
 | 
				
			||||||
		"inbox": `${config.url}/${_user.username}/inbox.json`,
 | 
							"inbox": `${userUrl}/inbox.json`,
 | 
				
			||||||
		"outbox": `${config.url}/${_user.username}/feed.json`,
 | 
							"outbox": `${userUrl}/outbox.json`,
 | 
				
			||||||
		"preferredUsername": _user.username,
 | 
							"preferredUsername": _user.username,
 | 
				
			||||||
		"name": _user.name,
 | 
							"name": _user.name,
 | 
				
			||||||
		"summary": _user.description,
 | 
							"summary": _user.description,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue