Cleanup, handle invalid usernames for ActivityPub person GET request

Signed-off-by: Anthony Wang <ta180m@pm.me>
This commit is contained in:
Anthony Wang
2022-03-24 18:44:44 -05:00
parent ebef769703
commit 46973f99fa
3 changed files with 6 additions and 4 deletions

View File

@@ -35,6 +35,9 @@ func Person(ctx *context.APIContext) {
// "$ref": "#/responses/ActivityPub"
user := user.GetUserByParamsName(ctx, "username")
if user == nil {
return
}
username := ctx.Params("username")
person := streams.NewActivityStreamsPerson()