diff --git a/pkg/controller/api/barertc/barertc_webhooks.go b/pkg/controller/api/barertc/barertc_webhooks.go index 855b7bd..84d5e61 100644 --- a/pkg/controller/api/barertc/barertc_webhooks.go +++ b/pkg/controller/api/barertc/barertc_webhooks.go @@ -4,11 +4,14 @@ import ( "fmt" "net/http" "strings" + "time" "code.nonshy.com/nonshy/website/pkg/config" "code.nonshy.com/nonshy/website/pkg/controller/api" "code.nonshy.com/nonshy/website/pkg/log" "code.nonshy.com/nonshy/website/pkg/models" + "code.nonshy.com/nonshy/website/pkg/templates" + "code.nonshy.com/nonshy/website/pkg/utility" ) // WebhookRequest is a JSON request wrapper around all webhook messages. @@ -188,9 +191,19 @@ func Profile() http.HandlerFunc { gender += fmt.Sprintf(" (%s)", pronouns) } + var photoCount = models.CountPublicPhotos(currentUser.ID) + var resp = Response{ OK: true, ProfileFields: []ProfileField{ + { + Name: "Member Since", + Value: fmt.Sprintf("%s ago", utility.FormatDurationCoarse(time.Since(currentUser.CreatedAt))), + }, + { + Name: "📸 Gallery", + Value: fmt.Sprintf("At least %d photo%s", photoCount, templates.Pluralize(photoCount)), + }, { Name: "Age", Value: currentUser.GetDisplayAge(),