diff options
Diffstat (limited to 'internal')
-rw-r--r-- | internal/api/auth/callback.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/internal/api/auth/callback.go b/internal/api/auth/callback.go index 37c257229..2dc36fac8 100644 --- a/internal/api/auth/callback.go +++ b/internal/api/auth/callback.go @@ -145,12 +145,18 @@ func (m *Module) CallbackGETHandler(c *gin.Context) { return } + // Since we require lowercase usernames at this point, lowercase the one + // from the claims and use this to autofill the form with a suggestion. + // + // Pending https://github.com/superseriousbusiness/gotosocial/issues/1813 + suggestedUsername := strings.ToLower(claims.PreferredUsername) + page := apiutil.WebPage{ Template: "finalize.tmpl", Instance: instance, Extra: map[string]any{ "name": claims.Name, - "preferredUsername": claims.PreferredUsername, + "suggestedUsername": suggestedUsername, }, } |